Author: Yousef-Sayed-Younis
Welcome to the C++ Terminal Version of the classic Tic Tac Toe game! This project allows you to enjoy the game in the terminal, either against a computer AI or another player.
For a modern and Flutter-based version of this game with a beautiful UI, check out the repository here:
👉 Tic Tac Toe Flutter Version
- Play against another player or the computer.
- Intelligent computer moves for challenging gameplay.
- Fully interactive terminal interface.
The game begins by asking the player to choose between playing against another player or the computer.
The board layout is displayed, and players take turns to make their moves.
- Board Layout
The board positions are numbered as follows:
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
- Game Outcome
- The winner is announced if a player manages to align their symbols in a row, column, or diagonal.
- The game ends in a draw if all positions are filled without a winner.
- Clone the repository:
git clone https://github.com/Yousef-Sayed-Younis/tic_tac-toe_terminal.git
- Navigate to the project directory:
cd tic_tac-toe-terminal
- Compile the code:
g++ main.cpp -o tic_tac_toe
- Run the executable:
./tic_tac_toe
Starting the game:
Welcome to Tic Tac Toe!
Play against Computer? (y/n): y
Choose X or O: X
Game Board:
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
Players take turns by entering the number corresponding to their move.
Feel free to contribute by opening issues or submitting pull requests to improve the gameplay or code.
For a visually appealing and feature-rich experience, check out the Flutter Version of this game!