diff --git a/apps/web/src/app/games/complement-race/components/GameDisplay.tsx b/apps/web/src/app/games/complement-race/components/GameDisplay.tsx index d51f871a..39adfea4 100644 --- a/apps/web/src/app/games/complement-race/components/GameDisplay.tsx +++ b/apps/web/src/app/games/complement-race/components/GameDisplay.tsx @@ -162,21 +162,16 @@ export function GameDisplay() { const handleContinueToNextRoute = () => { const nextRoute = state.currentRoute + 1 - // Hide celebration - dispatch({ type: 'HIDE_ROUTE_CELEBRATION' }) + // Start new route (this also hides celebration) + dispatch({ + type: 'START_NEW_ROUTE', + routeNumber: nextRoute, + stations: state.stations // Keep same stations for now + }) - // Generate new track and passengers for next route - setTimeout(() => { - dispatch({ - type: 'START_NEW_ROUTE', - routeNumber: nextRoute, - stations: state.stations // Keep same stations for now - }) - - // Generate new passengers - const newPassengers = generatePassengers(state.stations) - dispatch({ type: 'GENERATE_PASSENGERS', passengers: newPassengers }) - }, 100) + // Generate new passengers + const newPassengers = generatePassengers(state.stations) + dispatch({ type: 'GENERATE_PASSENGERS', passengers: newPassengers }) } if (!state.currentQuestion) return null diff --git a/apps/web/src/app/games/complement-race/context/ComplementRaceContext.tsx b/apps/web/src/app/games/complement-race/context/ComplementRaceContext.tsx index 679dda5f..c31a99f9 100644 --- a/apps/web/src/app/games/complement-race/context/ComplementRaceContext.tsx +++ b/apps/web/src/app/games/complement-race/context/ComplementRaceContext.tsx @@ -375,7 +375,8 @@ function gameReducer(state: GameState, action: GameAction): GameState { currentRoute: action.routeNumber, stations: action.stations, trainPosition: 0, - deliveredPassengers: 0 + deliveredPassengers: 0, + showRouteCelebration: false } case 'COMPLETE_ROUTE':