A simple Tic Tac Toe game built with Python that runs directly in the command-line interface (CLI). This project demonstrates basic game logic, user interaction, and control flow in Python.
Tic Tac Toe is a classic two-player game where the goal is to get three of your marks (X or O) in a row, either horizontally, vertically, or diagonally.
This version is a text-based game that runs in the terminal, allowing two players to take turns and interact via the command line.
. โโโ main.py # Main Python file for the game โโโ README.md # Project documentation
Clone the repository: ```bash git clone https://github.com/yourusername/text-tic-tac-toe.git cd text-tic-tac-toe
python main.py
๐ฎ How to Play 1. The game starts with Player X. 2. Players take turns by entering a number from 1 to 9, representing the positions on the board:
4 | 5 | 6 โโโ 7 | 8 | 9
3. The game ends when:
โข A player gets three marks in a row (horizontally, vertically, or diagonally).
โข The board is full (itโs a tie).
4. The updated board is displayed after each move.
๐งฉ Code Explanation
The game uses a simple loop to handle user input and update the game board. It includes functions to: โข Display the board โข Check for a winner โข Validate user input
๐ License
This project is licensed under the MIT License. See the LICENSE file for more details.
๐ง Contact
If you have any questions or feedback, feel free to reach out on fay.abdillah@gmail.com
๐ Show Your Support
If you like this project, please give it a โญ๏ธ on GitHub!