A simple 2-player Tic Tac Toe game built with Python. This runs directly in the terminal and is perfect for learning or playing with friends!
- Classic 3x3 Tic Tac Toe game
- Two-player mode (X vs O)
- Input validation and error handling
- Clear win and tie detection
- Clone this repository:
git clone https://github.com/your-username/tic-tac-toe-terminal.git cd tic-tac-toe-terminal
- Run the game: python3 tic_tac_toe.py
🎯 How to Play The board is a 3x3 grid represented with row and column indices from 0 to 2.
Players take turns entering their move as two numbers: row col.
Example input:
java Copy Edit Player X, enter row and col (0 2): The cell must be empty to place your symbol.
First to complete a line horizontally, vertically, or diagonally wins!
If the board fills up with no winner, it ends in a tie.
| |
Player X, enter row and col (0 1): 🛠️ Requirements Python 3.x
No additional libraries needed.
🧑💻 Author Jignesh Wadhwani