A beautiful and feature-rich Tic Tac Toe game built with Python Tkinter, featuring a sleek dark theme and intelligent AI opponent.
- Smart AI Opponent - Challenge yourself against an unbeatable AI using the Minimax algorithm
- Multiplayer Mode - Play with friends locally
- Modern Dark Theme - Sleek UI with hover effects and smooth interactions
- Score Tracking - Keep track of wins for both X and O players
- Visual Win Indicators - Different colors for X wins (Blue) and O wins (Red)
- Auto-Reset - Automatically clears board and scores when switching game modes
- Responsive Design - Smooth hover effects and visual feedback
- Play against an intelligent AI opponent
- AI uses Minimax algorithm (impossible to beat, best you can do is draw)
- Perfect for practice and challenge
- Local two-player mode
- Take turns playing X and O
- Great for playing with friends
- Python 3.7 or higher
- Tkinter (comes pre-installed with Python)
- Background: Dark navy (
#1a1a2e) - Game Cells: Dark blue (
#16213e) with hover effect - X Player: Bright blue (
#3498db) - O Player: Red (
#e74c3c) - X Wins: Blue title background
- O Wins: Red title background
- Draw: Orange title background
- Buttons: Green accents with smooth interactions
- Language: Python 3.7+
- GUI Framework: Tkinter (standard library)
- Algorithm: Minimax for AI decision making
- Architecture: Event-driven programming with callback functions
- No External Dependencies: Uses only Python standard library
Special thanks to @Vishesh-Pandey for providing the base for this project.
Feel free to fork this project and submit pull requests for:
- UI improvements
- Sound effects
Download code directly from tic_tac_toe.py
or
git clone https://github.com/Manoj8541/Tic-tac-toe-game-using-Tkinter-python-.gitcd Tic-tac-toe-game-using-Tkinter-python-python tic_tac_toe.py