diff --git a/apps/web/src/arcade-games/card-sorting/Provider.tsx b/apps/web/src/arcade-games/card-sorting/Provider.tsx index 55777ada..e7274b97 100644 --- a/apps/web/src/arcade-games/card-sorting/Provider.tsx +++ b/apps/web/src/arcade-games/card-sorting/Provider.tsx @@ -404,13 +404,11 @@ export function CardSortingProvider({ children }: { children: ReactNode }) { return } - // Prevent multiple simultaneous START_GAME moves when multiple clients - // click "Play Again" at the same time. Only allow if we're NOT already starting/in a game. - // Also check if we just started a game (within 500ms) to prevent rapid double-sends. + // Prevent rapid double-sends within 500ms to avoid duplicate game starts const now = Date.now() const justStarted = state.gameStartTime && now - state.gameStartTime < 500 - if (state.gamePhase === 'playing' || justStarted) { + if (justStarted) { return } diff --git a/apps/web/src/arcade-games/card-sorting/components/GameComponent.tsx b/apps/web/src/arcade-games/card-sorting/components/GameComponent.tsx index 7bea92a7..46851757 100644 --- a/apps/web/src/arcade-games/card-sorting/components/GameComponent.tsx +++ b/apps/web/src/arcade-games/card-sorting/components/GameComponent.tsx @@ -41,16 +41,7 @@ export function GameComponent() { : undefined } onNewGame={() => { - // If currently playing, go to setup first to clean up, then start immediately - if (state.gamePhase === 'playing') { - goToSetup() - // Use a small delay to let setup phase render, then start new game - setTimeout(() => { - startGame() - }, 100) - } else { - startGame() - } + startGame() }} >