Files
DFJ/tasks/task_023.txt
2025-12-16 08:57:19 +08:00

12 lines
772 B
Plaintext

# Task ID: 23
# Title: Game Replay Functionality
# Status: pending
# Dependencies: 2, 13, 15
# Priority: medium
# Description: Enable users to view replays of their past games, step-by-step, to analyze strategies and share exciting moments.
# Details:
Backend: When a game ends, store a condensed `moves` history (sequence of attacks, results) in the `GameSession` model in MongoDB. Frontend: Create a 'Replay' screen. Fetch `GameSession` data. Reconstruct the game state step-by-step, allowing users to navigate through turns (play, pause, next, previous).
# Test Strategy:
Play several games and verify that replays are saved. Access replay for different games and verify accurate reconstruction of the game. Test playback controls (play/pause, step forward/backward).