Skip to content

fix: stop the timer when the game ends - #1

Open
AnastaCodes wants to merge 1 commit into
mainfrom
fix/stop-timer-on-win
Open

AnastaCodes wants to merge 1 commit into
mainfrom
fix/stop-timer-on-win

Conversation

@AnastaCodes

Copy link
Copy Markdown
Owner

The end-of-game stats screen resets the timer display, but the interval kept running — after clicking OK the display was overwritten with a growing elapsed time.

Fix: clear the interval as soon as the stats screen appears. Restart is unaffected: the timer re-arms on the first card flip (if (!startTime) startTimer()).

🤖 Generated with Claude Code

The end-of-game stats reset the timer display, but the interval kept
running — after clicking OK the display was overwritten with a growing
elapsed time. Clear the interval as soon as the stats screen appears;
restarting still works because the timer re-arms on the first card flip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant