Chess Clock - 0.01
Sean J McKiernan (mekire)
My chess clock broke so I wrote a new one.
It is intended to be used with a laptop. The buttons of the mouse pad are intended to serve as the two players' timer buttons.
- The clock supports both delay and increment timing options.
- Use the presets already loaded or create your own and save them.
- The left and right mouse buttons correspond to the two players.
- Hit spacebar one time to pause the timer. Resume by having the player who's turn it isn't hit his timer button (i.e. his mouse pad button).
- Reset the clock by pressing spacebar three times consecutively.
If you would like to modify the time-control hold spacebar for 2 seconds while the clock is in the reset state.
This will cause the first digit of each display to blink. Use the mouse buttons to modify the timer (each corresponding to its side of the display)
and press spacebar to change to the next digit. Once you have set all four digits you will be able to add delay and increment time if desired.
Once you have set all the digits to the desired state pressing spacebar again will return you to the starting state displaying the new time-control.
Loading and Saving Presets:
This program allows you to save up to ten custom presets. The presets are stored on the numbers 1-0 on your keyboard (not the keypad).
Simply press the number where your desired preset is stored while the clock is in its reset state and it will load that time-control.
To save your own custom preset, set the clock as described above in 'Setting' and then press and hold the number on which you would like to store that time-control.
After 2 seconds the display screens will flash and the new time-control will overwrite the previous time-control that was mapped to that key.
(There is a function in the program called "ChessClock.factory_reset" that will restore the original presets. To trigger this 'factory_reset' you must uncomment
the line calling this function within ChessClock's __init__ function. After the program has run remember to go back and recomment the line.)
To those of you not familiar with actual chess clocks the controls may seem odd.
I have written it as such mainly for two reasons. Firstly you do not want the clock to
be accidentally reset mid-game. And secondly, I modeled the controls off of a very common
type of chess clock that only has three buttons total (but a million features).
Also, I should mention that I did in fact write this program for my own use so I wanted the controls to be somewhat intuitive for other fellow chess players.
click to view original size
|Chess Clock - 0.01 ||- Dec 22, 2011|
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
Oct 28, 2014
Oct 21, 2014
Oct 20, 2014
Oct 16, 2014
Oct 9, 2014
Oct 8, 2014
Oct 7, 2014
Oct 4, 2014
Oct 1, 2014
Sep 19, 2014
Sep 17, 2014
Sep 9, 2014