GNOME Bugzilla – Bug 701579
Chess game resume does not take into account the time factor
Last modified: 2013-06-08 22:00:30 UTC
User can notice that resuming a timed chess game will reset the timer to it's start position. Steps : 1. Start Chess 2. Go to settings - preferences and set game time to 1 minute 3. Start a new game 4. Move 2 pieces and observe time left is "XX" seconds 5. Press "X" button to close CHess 6. Reopen chess and notice it resumes the previous game 7. Observe timer is now back to 1 minute Expected outcome On resume Chess timer should also resume from "XX" seconds Actual outcome On resume Chess timer starts from beginning, 1 minute
Yup. The time remaining needs to be saved in the PGN file and read when reopened. (Currently only the initial time each player starts with is saved, which is all well and good but not sufficient.)
The following fix has been pushed: 61975a9 Set the clock properly when loading a timed game
Created attachment 246334 [details] [review] Set the clock properly when loading a timed game Previously, we stored the starting time in the PGN in the standardized TimeControl field. However this is not sufficient for restarting games in progress, as the time remaining for each player is not stored. So we must extend PGN to store the time remaining for each player, and look at that when starting a game. (Custom PGN extensions are kosher; that's what we're already doing to store opposing AI and difficulty.)