https://github.com/sumitst05/tic_tac_toe_cpp
A Tic Tac Toe game made in C++. Featuring undefeatable AI opponent (You can draw against it)
https://github.com/sumitst05/tic_tac_toe_cpp
Last synced: over 1 year ago
JSON representation
A Tic Tac Toe game made in C++. Featuring undefeatable AI opponent (You can draw against it)
- Host: GitHub
- URL: https://github.com/sumitst05/tic_tac_toe_cpp
- Owner: sumitst05
- License: mit
- Created: 2022-10-23T17:09:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-09T10:47:36.000Z (about 3 years ago)
- Last Synced: 2025-04-23T02:16:39.839Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ❌ Tic_Tac_Toe_cpp ⭕
This is a simple command-line Tic Tac Toe game written in C++.
- Has Single & Multi Player options.
- Can select different characters as Marker in Multi-Player option.
- Includes Invalid-Input flags (Program won't fall in an infinite loop if character is entered in buffer whe asked for integer or vice-cersa)
- Implements Minimax Algorithm so the computer is able to make the best moves!!
## Installation
1. Clone the repository:
```bash
git clone https://github.com/sumitst05/Tic_Tac_Toe_cpp.git
```
2. cd into Tic_Tac_Toe_cpp directory:
```bash
cd Tic_Tac_Toe_cpp
```
3. Compile and Run the code using g++:
```bash
g++ -o Tic_Tac_Toe Tic_Tac_Toe.cpp && ./Tic_Tac_Toe
```
(or you can use an IDE)
## How To Play
- Start the game
- Select [S]ingle / [M]ulti-Player option.
- Single Player:
- Take turns and play with the computer (Computer is actually smart now with the implementation of Minimax Algorithm)
- Multi Player:
- Select the marker for each player
- Take turns entering moves by typing numers from 1 to 9 to place your symbol there.
## Contributing
If you find a bug or have an idea for a new feature, feel free to open an issue or submit a pull request.
## License
This project is licensed under the [MIT License](LICENSE)