GNOME Bugzilla – Bug 779937
Fischer clock on losing clock isn't set to 0
Last modified: 2017-03-12 22:49:21 UTC
Created attachment 347747 [details] White wins but clock shows 1 second on the black timer Same for black and white. Seems the Fischer clock is adding the increment even when the game is lost which shouldn't be the case. Steps to reproduce: - Select Fischer clock type from preferences - Start the game and let one player loose because of time out - Clock shows the "timer increment" amount of time remaining
Created attachment 347748 [details] Preferences
Created attachment 347749 [details] 10 second increment set in preferences
(In reply to Sahil Sareen from comment #0) > Created attachment 347747 [details] > White wins but clock shows 1 second on the black timer > > Same for black and white. > Seems the Fischer clock is adding the increment even when the game is lost > which shouldn't be the case. No, it's not adding the increment. It never makes it down to zero. Tt stops at the increment.
I see in commit d00db10c103617fa3d864366eb335624b05ac559 you added ChessClock.white_extra_seconds and ChessClock.black_extra_seconds. Looks like these are not being properly accounted for in deciding when to end the game. For instance, if you have white make one move, the game ends when black has one increment of time remaining (1s or 10s in your examples). But if you have white make a move, black make a move, then white make another move, the game will end when black has two increments of time remaining (2s or 20s in your examples).
Created attachment 347757 [details] [review] clock: Fix game ending too soon when using Fischer/Bronstein clocks This fixes it for me. Sahil, does it look sane? Note that tomorrow is the last day to get this in before hard code freeze. Do you have time to push this and do a new release (3.23.92.5) before then, or do yaou want me to handle it? (And what about Sudoku?)
Actually I'll just do them.
Thanks for fixing this Michael (and also for taking care of the releases)! I'll be around more often now.