12 lines
866 B
Plaintext
12 lines
866 B
Plaintext
# Task ID: 36
|
|
# Title: Spectator Mode
|
|
# Status: pending
|
|
# Dependencies: 10, 13, 21
|
|
# Priority: low
|
|
# Description: Allow non-playing users to join active game rooms as spectators, viewing the ongoing match in real-time.
|
|
# Details:
|
|
Backend: Extend WebSocket handling to allow 'spectator' roles. When a spectator joins, send them the current game state snapshot. Broadcast game updates to spectators without allowing them to send game actions. Frontend: Add a 'Spectate' option to rooms or friend profiles. Display the game board and actions without interactive controls. Hide opponent's plane placement until destroyed.
|
|
|
|
# Test Strategy:
|
|
Join an active game as a spectator. Verify real-time updates of game state (attacks, hits, turns). Ensure spectators cannot interact with the game. Test joining/leaving spectator mode. Verify performance with multiple spectators.
|