Reply to the Jeffrey Turner's message, wrote on 19/06/2015 at 17:28:
Hi Gabriele,Hello Jefrey.
Yes, I did.
Randy told me you worked on a Python chess clock, which is very exciting
news to me. I have written these specs up, and would like to try to code it
up. I'd appreciate any feedback you might have to offer.
Correct.
Chess Clock with Game Record Specifications
Basic Overview
A chess clock is actually two clocks, used to track the time of two players
in one game. Usually, both clocks are set for the same period of time,
although sometimes one player will give his opponent more time as a
handicap. The Black player starts the White Player's clock to start the
game. Physical clocks have two buttons, one for each player. When Black
presses the button down on his side of the clock. White's clock begins
counting down the allotted time. As soon as he makes his move, he presses
his button, his clock stops at whatever time he has left, and Black's clock
starts counting down. If either player's clock runs down to 0, he loses the
game, no matter what the status of the board is. For our purposes, both
clocks will be run by a timekeper who will also record the game by entering
chess notation for each move played.
Sample Chess NotationUsually you don't go new line each move but each 4 or 6 moves. A move is made by a progressive number, plus the white's half-move, plus the black's half-move.
1.e4 c5
2.Nf3 e6
3.d4 cxd4
Knowledge of chess notation is assumed.
Sample Notation with times for each playerAccording to the PGN specification, times should be in square brakets.
1.e4 c5 59:57 59:54
InputsVarious considerations here:
the computer will provide the number of each move. The operator will provide
some initial information, the names of the players, the event, the date, the
timekeeper's name, any pause points, the time to be set on each clock, and
replenishment values.
Automatic Pause Points and Clock Replenishment It is common for a timekeeper
to alert the players when certain times have been reached. Often, both
players will have one hour to start the game, and must complete 30 moves
within that hour. After the player with the least amount of time left has
played 20 minutes, when his next move is entered, both clocks are paused,
and the timekeeper reports how many moves have been played and how much time
is remaining on each clock.
Automatic Pause Reports will look like this:
Move [move number],White Time: 59:44, Black Time: 59:32, [White or Black] to
move.
Automatic pause points are often 20, 40, 50, and 55 minutes, and the pause
actually happens whenever the player with the least time left has made a
move after crossing these time limits. Once 30 moves have been completed by
both players, they receive an additional amount of time which will be
entered at the start as replenishment time.
Resuming PlayOk.
After time reports have been given, the timekeeper will resume play,
starting the clock of the appropriate player, by pressing enter.
Confirmation of which clock is starting will be given:
Starting clock for [black or white, depending]
Ok. Remember that TK must have the possibility to change the move counter due to possible failed check in chessboard position.
Move [move number],White Time: 59:44, Black Time: 59:32, [White or Black] to
move.
Play will resume and the player's clock that was stopped will resume running
when enter is pressed. Confirmation of the restart will be given:
Starting clock for [black or white, depending]
Here I would insert the comparison clock feature I told before. And, instead of elapsed time, I would give the remaining time.
Time Check
Entering 't' will display the same message as for pauses, but the running
clock will not be stopped.
Move [move number],White Time: 59:44, Black Time: 59:32, [White or Black] to
move.
Oh sorry, I didn't read.
Corrections
The timekeeper can correct the last move entered by entering 'c'. This will
pause the running clock, display the pause message (see above), and undo the
last move. The stopped clock will restart when another move is entered and
the restart confirmation message (see above) will be displayed.
Appended to the game record, I would add also some statistics, for the match in general and for players:
Game completion
The timekeeper will indicate a checkmate by entering '#', a draw by entering
'=', and a resignation by entering 'r'. the running clock will be stopped
and the game record written.
ok.
Exclusions
This program will nott check for valid chess moves. It will not indicate
checks, or e.p. notifications, (a type of pawn capture. it will not record
board positions to aid in determining draws by repetition.
The automailing is quite simply to implement. I already have the function written, if you like.
Possible Enhancements
Future versions of the program could provide alternative notation outputs,
perhaps one with times, and one without. Game records could be automagically
emailed to the players and tournament directors upon completion of the game.