After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701579 - Chess game resume does not take into account the time factor
Chess game resume does not take into account the time factor
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
3.8.x
Other Linux
: High major
: ---
Assigned To: Michael Catanzaro
gnome-chess-maint
Depends on:
Blocks:
 
 
Reported: 2013-06-04 08:50 UTC by Erwan
Modified: 2013-06-08 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set the clock properly when loading a timed game (4.61 KB, patch)
2013-06-08 22:00 UTC, Michael Catanzaro
committed Details | Review

Description Erwan 2013-06-04 08:50:15 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
Comment 1 Michael Catanzaro 2013-06-04 21:30:25 UTC
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.)
Comment 2 Michael Catanzaro 2013-06-08 22:00:28 UTC
The following fix has been pushed:
61975a9 Set the clock properly when loading a timed game
Comment 3 Michael Catanzaro 2013-06-08 22:00:30 UTC
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.)