Skip to content

Conversation

@Hectoronian
Copy link

Summary

Fixes an issue where the chess clock could start at 0:00 and repeatedly trigger the time-up dialog, including after app restarts.

Changes

  • Prevent clock from starting with invalid (0) time
  • Ensure time-up dialog is shown only once per game
  • Properly reset game and disable clock after flag fall
  • Prevent expired clock state from being restored on app restart

Result

Clock behavior now matches expected chess flow and no longer triggers false time-up dialogs.

@jcarolus
Copy link
Owner

jcarolus commented Jan 7, 2026

Hi @Hectoronian
Currently, the game engine can only handle calculated by board position and history state like, draw and checkmate and it's not aware of clock, resignation or agreed draws. Ideally I would like to have it as part of the game state, so that no logic needs to be setup around this where it does not belong (the global pref).
Perhaps we can do this in the PGN headers

[Time] local time the game started
[TimeControl] e.g.: 40/7200:3600 

based on
https://en.wikipedia.org/wiki/Portable_Game_Notation

and the consumed time can be added as a PGN move comment
{[%timestamp 1]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants