https://github.com/krikoset2/tic-tac-toe
A tic-tac-toe game in c++
https://github.com/krikoset2/tic-tac-toe
cpp game terminal-game
Last synced: over 1 year ago
JSON representation
A tic-tac-toe game in c++
- Host: GitHub
- URL: https://github.com/krikoset2/tic-tac-toe
- Owner: Krikoset2
- License: mit
- Created: 2024-12-28T22:08:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-28T22:17:11.000Z (over 1 year ago)
- Last Synced: 2025-01-07T04:34:19.480Z (over 1 year ago)
- Topics: cpp, game, terminal-game
- Language: C++
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tic Tac Toe Game
A classic Tic Tac Toe game where you play as "X" against the computer (who plays as "O"). The computer uses a minimax algorithm for optimal play.
## How to Play
1. You will be "X" and the computer will be "O".
2. Enter a number between 1 and 9 to make your move (corresponding to the grid positions).
3. The first player to get three in a row (horizontally, vertically, or diagonally) wins.
4. If the board is full and there is no winner, the game ends in a tie.
## Commands
- **Enter a number (1-9)**: To make your move on the Tic Tac Toe grid.
- **Play Again**: After the game ends, type `Y` or `y` to start a new game.
Enjoy the game!
## License
MIT License.