Skip to content

Alyaatamer/Puzzle_and_Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

8-Puzzle & Tic-Tac-Toe Game Suite

Overview

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.

Algorithms

  • 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.

Features

  • 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.

Screenshots

Game Menu (Light theme) Game Menu (Dark Theme)
Puzzle (Light theme) Puzzle (Dark Theme)
Tic-Tac-Toe (Light theme) Tic-Tac-Toe (Dark Theme)

Installation

  1. Clone the repo:
    git clone https://github.com/Alyaatamer/Puzzle_and_Tic-Tac-Toe.git
  2. Install dependencies:
    pip install customtkinter
  3. Run:
    python main.py

Requirements

  • Python 3.12
  • customtkinter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages