feat: skip countdown for train mode (sprint)

Train mode now starts immediately when clicking "Start Your Race!" button,
bypassing the 3-2-1-GO countdown. Other game modes (practice, survival) still
show the countdown as expected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-10-01 11:20:31 -05:00
parent e06a750454
commit 65dafc9215

View File

@@ -23,7 +23,13 @@ export function GameControls() {
const handleStartRace = () => {
// Update URL to match selected game style when starting
router.push(`/games/complement-race/${state.style}`)
dispatch({ type: 'START_COUNTDOWN' })
// Train mode (sprint) doesn't need countdown - start immediately
if (state.style === 'sprint') {
dispatch({ type: 'BEGIN_GAME' })
} else {
dispatch({ type: 'START_COUNTDOWN' })
}
}
return (