Welcome to Tic Tac Toe, a console-based game implemented in Python! Test your skills against a computer opponent or play with a friend.
- Two Modes: Play against the computer or a second player.
- AI-Driven Gameplay: The computer uses a simple algorithm to make intelligent moves.
- User-Friendly Interface: Play the game seamlessly with prompts and a clear board display.
- Replay Option: Restart the game after each match.
- Clone this repository:
git clone <github.com/codewithanirban/Tic-Tac-Toe>
- Navigate to the project directory:
cd TicTacToe
- Run the game:
python tictactoe1.py
- Follow the on-screen prompts to make your move.
- Player Moves: Enter a number (1-9) corresponding to the grid position.
- Computer Moves: The AI ensures a competitive game experience.
- Winning Logic: Detects row, column, and diagonal wins.
- Tie Detection: Recognizes when the board is full without a winner.
This project demonstrates:
- Python functions and modular coding.
- Conditional statements and loops.
- Basic AI for decision-making in games.
Feel free to improve the AI logic, enhance the UI, or add new features. Pull requests are welcome!
This project is licensed under the MIT License.