Endless Tic-Tac-Toe

A graphical Tic-Tac-Toe game built with Python and Pygame, featuring a pixel-art aesthetic and a classic two-player experience.

What are its features?

  • Human vs Human — Two players take turns on the same machine (hot-seat).
  • Human vs AI(Work in progress, not yet playable.)
  • 3×3 Grid — Turn-based play with alternating X and O.
  • Win & Draw Detection — Automatically detects all 8 winning lines and board fills.
  • Confetti Celebration — Particle effects when a player wins.
  • Pixel-Art Styling — Custom pixel fonts for a retro look.
  • Play Again — Quick restart from the result screen.

How do you get started?

What are the prerequisites?

  • Python 3.13 or higher

How do you install it?

1
pip install -r requirements.txt

Or with uv:

1
uv sync

How do you run the game?

1
python game.py

How do you play?

  • Left-click a cell to place your mark (X or O).
  • Click “Play Again!” after a win or draw to start a new game.

How is the project structured?

1
2
3
4
5
6
7
8
9
├── game.py          — Entry point and main game loop
├── board.py         — Game board, grid rendering, move logic, win/draw detection
├── effects.py       — Confetti particle system for win celebrations
├── assets/          — Fonts and images
│   ├── PixeloidSans.ttf
│   ├── PixeloidSans-Bold.ttf
│   └── tic-tac-toe.png
├── requirements.txt — Runtime dependency (pygame)
└── pyproject.toml   — Project metadata and Python version

What technologies were used?

What are the current limitations?

  • Human vs AI mode is a stub and not yet functional. Selecting it will cause a runtime error. Only Human vs Human is fully implemented.

What is the future roadmap?

  • Implement AI opponent (random move / minimax)
  • Add menu improvements and game state polish
  • Online multiplayer (future stretch goal)