https://github.com/tarekuzjaman0/tic-tac-teo
A glimpse of the Tic-Tac-Toe game in action. The interface is designed for an intuitive and smooth gameplay experience, featuring a modern layout and clear, high-contrast markers for X and O. The game includes an intelligent AI opponent and highlights winning combinations for easy visibility.
https://github.com/tarekuzjaman0/tic-tac-teo
python python-game python-game-development python-tkinter-application tarekuzjaman tic-tac-toe tictactoe
Last synced: 4 months ago
JSON representation
A glimpse of the Tic-Tac-Toe game in action. The interface is designed for an intuitive and smooth gameplay experience, featuring a modern layout and clear, high-contrast markers for X and O. The game includes an intelligent AI opponent and highlights winning combinations for easy visibility.
- Host: GitHub
- URL: https://github.com/tarekuzjaman0/tic-tac-teo
- Owner: Tarekuzjaman0
- Created: 2025-02-03T09:23:19.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T09:50:13.000Z (5 months ago)
- Last Synced: 2025-02-03T10:33:06.349Z (5 months ago)
- Topics: python, python-game, python-game-development, python-tkinter-application, tarekuzjaman, tic-tac-toe, tictactoe
- Language: Python
- Homepage: https://www.linkedin.com/in/tarekuzjaman/
- Size: 148 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πΉοΈ Tic Tac Toe - Python with Tkinter
A **modern, responsive, and intelligent Tic Tac Toe game** built using **Python and Tkinter**. This project features a **smart AI opponent**, a **material-inspired UI**, and an **interactive gaming experience**.
---
## π Features
- β **Single-Player Mode** β Play against a computer opponent with strategic AI.
- β **Smart AI (Minimax-like Heuristic)** β The AI makes **optimal moves**, blocks the playerβs winning chances, and takes advantage when possible.
- β **Material-Inspired UI** β Clean and modern design with smooth colors, rounded buttons, and an intuitive interface.
- β **Winning Combination Highlighting** β When a player wins, the **winning tiles are highlighted** for better visibility.
- β **Game Reset Feature** β Click the **New Game** button to instantly reset the board.
- β **Randomized AI Moves** β If multiple best moves exist, the AI selects one randomly for variety.
- β **Optimized for Performance** β The game logic runs efficiently, ensuring a smooth experience.---
## πΈ Screenshots

---
## π Installation & Setup
Follow these steps to set up and run the Tic Tac Toe game on your local machine:
1. **Ensure Python 3.x is installed** on your system.
2. **Clone the repository** using the following command:```bash
git clone https://github.com/Tarekuzjaman0/Tic-Tac-Teo.git## π How to Play
1. **Start the game** β Player (X) makes the first move.
2. **Make a move** β Click on an empty cell to place your X.
3. **AIβs turn** β The computer (O) makes its move.
4. **Winning condition** β The first to align three marks (X or O) in a row, column, or diagonal wins!
5. **Restart anytime** β Click the "New Game" button to play again.## π― Game Logic
The AI opponent follows an intelligent strategy:
1. **Winning Move** β The AI checks if it can win in the current turn.
2. **Block Player** β If the player is about to win, the AI blocks the winning move.
3. **Center, Corner, or Random** β If no immediate threat or win is found, the AI picks the center, a corner, or a random available spot.This strategy ensures that the game is always challenging and engaging!
## π¨ UI Design
The game features a modern, material-inspired UI with:
- Soft, neutral color tones for a smooth aesthetic.
- Rounded buttons for a pleasant user experience.
- High-contrast fonts for better readability.
- Winning combinations highlighted for easy visibility.## π€ Contributing
Want to enhance the game? Feel free to fork the repository, make your changes, and submit a pull request. Contributions are always welcome!## π License
This project is open-source and available under the [MIT License](LICENSE).