Skip to content

Manoj8541/Tic-tac-toe-game-using-Tkinter-python-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-tac-toe-game-using-Tkinter-python-

A beautiful and feature-rich Tic Tac Toe game built with Python Tkinter, featuring a sleek dark theme and intelligent AI opponent.

Features

  • 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

Game Modes

Single Player

  • Play against an intelligent AI opponent
  • AI uses Minimax algorithm (impossible to beat, best you can do is draw)
  • Perfect for practice and challenge

Multiplayer

  • Local two-player mode
  • Take turns playing X and O
  • Great for playing with friends

How to Run

Prerequisites

  • Python 3.7 or higher
  • Tkinter (comes pre-installed with Python)

Color Scheme

  • 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

Technical Details

  • 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

Acknowledgments

Special thanks to @Vishesh-Pandey for providing the base for this project.

Contributing

Feel free to fork this project and submit pull requests for:

  • UI improvements
  • Sound effects

Installation & Running

Download code directly from tic_tac_toe.py

or

1. Clone or download the repository

git clone https://github.com/Manoj8541/Tic-tac-toe-game-using-Tkinter-python-.git

2. Navigate to the directory

cd Tic-tac-toe-game-using-Tkinter-python-

3. Run the game

python tic_tac_toe.py

About

A beautiful and feature-rich Tic Tac Toe game built with Python Tkinter, featuring a sleek dark theme and intelligent AI opponent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages