A simple and interactive Tic Tac Toe game where two players take turns to place "X" or "O" in a 3x3 grid, aiming to align three symbols in a row horizontally, vertically, or diagonally to win
The Tic Tac Toe (XO) game is a popular two-player board game. Players alternate placing "X" and "O" in a grid with the objective to get three of their marks in a row. This project provides a simple implementation of the game in Python using Tkinter for the graphical user interface (GUI).
Key features include:
- Real-time gameplay between two players.
- A blue highlight for the winning line.
- A reset option to start a new game.
- Multiplayer Mode: Play with a friend locally, alternating turns.
- Winning Logic: Highlights the winning line in blue when a player wins.
- Simple Interface: Clean, minimalistic GUI with Tkinter.
- Reset Button: Option to reset the game board after a win or a draw.
- Cross-Platform: Runs on any system with Python and Tkinter installed. Enjoy playing Tic Tac Toe! Don't forget to โญ๏ธ this repository if you liked it!
To set up the Tic Tac Toe game locally, follow these steps:
- Clone the repository:
https://github.com/abderrahmane-laourf/game-X-O-on-python-Tic-Tac-Toe-.git
Navigate to the project directory: bash Copier le codE cd tic-tac-to Ensure Python is installed: Make sure you have Python 3.x and Tkinter installed. Tkinter usually comes pre-installed with Python.
Run the game: Simply run the Python file:
bash Copier le code python tic_tac_toe.py Usage ๐ The game starts with Player X. Players take turns to click on an empty square to place their symbol (X or O). The first player to align three of their symbols in a row wins. If the board is full and there is no winner, the game ends in a draw. After the game ends, you can reset the board and play again. Example Gameplay: Player X places their symbol in the center square. Player O places their symbol in a corner. The game continues until one player wins or all squares are fiLled. Roadmap ๐ฃ๏ธ Current Status: Basic Tic Tac Toe functionality (X/O placement) Winning logic (horizontal, vertical, diagonal). Blue highlight for the winning line; Add AI for single-player mode (optional). Improve game reset functionality (optional) Contributing ๐ค We welcome contributions to improve this game! To contribute:
Fork the repository. Create a new branch for your feature: bash Copier le code git checkout -b feature/YourFeature Commit your changes: bash Copier le code git commit -m "Add new feature" Push to the branch: bash Copier le code git push origin feature/YourFeature Open a pull request. License ๐ This project is licensed under the MIT License - see the LICENSE file for details.
Contact ๐ฌ If you have any questions or suggestions, feel free to contact:
Name: [Your Name] Email: [Your Email Address] GitHub: [Your GitHub Profile Link] Portfolio/Website: [Your Website Link] Acknowledgments ๐ [Your Name] for developing the game. Tkinter for the graphical interface. [Any other libraries or resources used].
markdown Copier le code
- Overview: Describes the game and its purpose.
- Features: Lists all major features of the game.
- Installation: Provides clear steps on how to set up and run the game locally.
- Usage: Explains how to play and interact with the game.
- Roadmap: Future enhancements or features planned for the project.
- Contributing: How others can contribute to improving the game.
- License: Information about the license under which the project is distributed.
Feel free to customize this template according to your projectโs specific details!