Parent Epic
#22
Description
Implement turn rotation logic so players take turns in order.
Requirements
- Track current player in RoomState (CurrentPlayer field exists)
- Initialize turn order when game starts (after all boards submitted)
- Rotate to next player after each valid move
- Skip players who are eliminated (all ships sunk)
- Broadcast turn changes to all players
Turn Order
- 3 players: A → B → C → A → ...
- If B is eliminated: A → C → A → C → ...
Events
- Outbound:
NEXT_TURN (already defined)
Files to Modify
internal/game/types.go - Turn tracking
internal/api/handlers/room.go - Turn initialization
internal/api/jobs/game_jobs.go - Turn rotation job
Unit Tests
Acceptance Criteria
Parent Epic
#22
Description
Implement turn rotation logic so players take turns in order.
Requirements
Turn Order
Events
NEXT_TURN(already defined)Files to Modify
internal/game/types.go- Turn trackinginternal/api/handlers/room.go- Turn initializationinternal/api/jobs/game_jobs.go- Turn rotation jobUnit Tests
Acceptance Criteria