A Python-based game suite with 8-Puzzle and Tic-Tac-Toe, built using customtkinter
for a modern GUI. Solve the
8-Puzzle manually or with AI, or play Tic-Tac-Toe against an AI opponent. Features a game selection menu with light/dark
theme toggle.
- 8-Puzzle:
- A Search*: Finds the optimal solution using Manhattan Distance heuristic.
- Tic-Tac-Toe:
- Minimax: Creates an unbeatable AI by evaluating all possible moves.
- Game Menu: Choose between 8-Puzzle or Tic-Tac-Toe, toggle theme.
- 8-Puzzle:
- Manual tile moves or AI solver with step-by-step animation.
- Random solvable puzzles, move counter, and solving time.
- Play again or return to menu.
- Tic-Tac-Toe:
- Play as 'X' vs. AI ('O').
- Detects wins, losses, or draws.
- Play again or return to menu.
Game Menu (Light theme) | Game Menu (Dark Theme) |
---|---|
![]() |
![]() |
Puzzle (Light theme) | Puzzle (Dark Theme) |
---|---|
![]() |
![]() |
Tic-Tac-Toe (Light theme) | Tic-Tac-Toe (Dark Theme) |
---|---|
![]() |
![]() |
- Clone the repo:
git clone https://github.com/Alyaatamer/Puzzle_and_Tic-Tac-Toe.git
- Install dependencies:
pip install customtkinter
- Run:
python main.py
- Python 3.12
customtkinter