Neo Tic-Tac-Toe is a Python-based implementation of the classic Tic-Tac-Toe, evolved through three distinct stages of development featuring both Player vs Player and Player vs AI modes. It transitions from a command-line interface logic engine to a fully interactive graphical application powered by Pygame.
- Retro UI: Neon color palette, dynamic background animations, and screen shake effects.
- Unbeatable AI: Challenge the Hard mode powered by the Minimax algorithm, or practice against the Easy Random AI.
- Dual Interface: Choose between the full GUI experience (Pygame) or the fast CLI version using
pygame_main.pyormain.py. - Immersive Audio: Custom sound effects for moves, wins, and interactions.
- Flexible Gameplay: Supports Human vs. Human and Human vs. AI modes.
src/AI: Contains AI logic (Random AI and Minimax AI).src/UI: Handles the user interface, including the retro effects factory and menus.src/controllers: Manages game logic and state flow.src/model: Core game data structures (Board, Game Rules).src/Sounds: Sound resource management.
- Python 3.x
- Pygame
-
Clone the repository:
git clone https://github.com/rmit-nct/NEOTicTacToe.git cd NEOTicTacToe -
Install dependencies:
pip install pygame
Experience the full retro theme with visual effects and sound.
- Run the game:
python pygame_main.py
- Controls:
- Menu: Click on the buttons to select your opponent (PvP, AI Easy, or AI Hard).
- Gameplay: Use your Mouse to click on the grid cells to place your mark.
- Post-Game: Choose to Restart, return to Menu, or Quit via the on-screen buttons.
A lightweight text-based version for quick play in the terminal.
- Run the game:
python main.py
- Controls:
- Menu: Enter
1,2, or3to select the game mode. - Gameplay: Enter a number from 1-9 to place your mark on the corresponding cell.
1 | 2 | 3 ----------- 4 | 5 | 6 ----------- 7 | 8 | 9 - Post-Game: Follow the prompts to play again or exit.
- Menu: Enter