Skip to content

πŸ’‘ [Feature]: Add Undo/Redo, Match Replay, Save/Load, and Move History Features to Tic Tac Toe CLI GameΒ #714

@jyotish6699

Description

@jyotish6699

❓ Problem Statement

The current Tic Tac Toe CLI game already includes multiple game modes, AI difficulty levels, scoreboard management, and a polished terminal UI. However, the gameplay currently lacks advanced match management and replay functionality.

Players cannot:

  • undo accidental moves
  • redo reverted moves
  • save ongoing matches
  • load previous matches
  • replay completed games
  • view full move history

Adding these features would significantly improve gameplay experience and educational value while keeping the project beginner-friendly and dependency-free.


πŸš€ Proposed Enhancement

Add the following gameplay management features to the existing Tic Tac Toe CLI game:

βœ… Undo / Redo System

  • Undo previous moves
  • Redo reverted moves
  • Maintain board state history using stacks

βœ… Save / Load Match System

  • Save current game state into JSON
  • Load saved matches later
  • Preserve:
    • board state
    • scores
    • move history
    • current turn

βœ… Match Replay System

  • Replay completed matches step-by-step
  • Rebuild board using stored move history
  • Improve CLI interaction experience

βœ… Move History Viewer

Display:

  • move order
  • player actions
  • played positions
  • complete match timeline

πŸ›  Suggested Implementation

  • Add helper functions for:

    • save_game()
    • load_game()
    • replay_game()
    • show_move_history()
  • Introduce:

    • undo stack
    • redo stack
    • move history tracking
  • Preserve:

    • existing AI system
    • current menus
    • scoreboard
    • gameplay architecture
  • Keep project:

    • CLI-based
    • beginner-friendly
    • zero dependency

  • I am a registered GSSoC 2026 contributor.
  • I would like to implement this feature myself.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions