🎮 A fun and interactive Tic-Tac-Toe game with an AI opponent!
📚 This program allows you to play Tic-Tac-Toe against an AI opponent. It uses the powerful Minimax algorithm to provide a challenging and strategic gameplay experience. The AI opponent is designed to make intelligent moves and provide a tough competition.
🔥 Challenge yourself and see if you can outsmart the AI in this classic game of Tic-Tac-Toe!
✨ Here are some of the features of this Tic-Tac-Toe game:
- Play against a smart AI opponent.
- Interactive and user-friendly interface.
- Keep track of the scores for each player.
- Option to play multiple rounds.
- Enjoy the thrill of winning or experiencing a tie.
📝 Follow these simple steps to start playing the game:
- Enter the names of the two players.
- The game starts with Player 1 (X) making the first move.
- Players take turns placing their markers (X or O) on an empty spot of the 3x3 grid.
- The goal is to get three markers in a row (horizontally, vertically, or diagonally).
- If a player succeeds in getting three markers in a row, they win the game.
- If all spots are filled without any player winning, the game ends in a tie.
- After each game, the scores of the players will be displayed.
- You can choose to play again or exit the game.
🚀 To run this program on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/tic-tac-toe.git
- Navigate to the project directory:
cd tic-tac-toe
- Compile the code:
g++ tic_tac_toe.cpp -o tic_tac_toe
- Run the program:
./tic_tac_toe
⚙️ This program requires the following:
- C++ compiler (supporting C++11 or later)
🙏 This Tic-Tac-Toe game is built using the minimax algorithm and inspired by the classic game we all love.
📜 This project is licensed under the MIT License.
🌟 Have fun playing Tic-Tac-Toe and enjoy your gaming experience! 🌟