https://github.com/kunalshah017/tic-tac-toe
TicTacToe Game Completely build in C++ and Console Based Gameplay
https://github.com/kunalshah017/tic-tac-toe
collaborate communityexchange ghdesktop github github-codespaces
Last synced: 11 months ago
JSON representation
TicTacToe Game Completely build in C++ and Console Based Gameplay
- Host: GitHub
- URL: https://github.com/kunalshah017/tic-tac-toe
- Owner: kunalshah017
- License: mit
- Created: 2023-05-19T06:48:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-17T18:03:01.000Z (over 2 years ago)
- Last Synced: 2025-05-11T03:37:31.375Z (about 1 year ago)
- Topics: collaborate, communityexchange, ghdesktop, github, github-codespaces
- Language: C++
- Size: 47.9 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Console-based Tic Tac Toe Game

This is a console-based implementation of the popular Tic Tac Toe game, written in C++. The game allows two players to play against each other on a 3x3 grid.
## Features
- Interactive gameplay in the console
- Clear and intuitive user interface
- Error handling for invalid moves
- Intelligent computer player (optional)
## Contributors
[](https://github.com/kunalshah017/tic-tac-toe/graphs/contributors)
#### people who made this possible ❤
## Getting Started
### Prerequisites
To compile and run the Tic Tac Toe game, you need to have the following software installed on your system:
- C++ compiler (supporting C++11 or later)
- Make sure the necessary libraries are available (standard library).
### Compilation
To compile the game, run the following command in your terminal or command prompt:
```
g++ -std=c++11 main.cpp -o tictactoe
```
### Running the Game
After successful compilation, you can run the game by executing the compiled binary:
```
./tictactoe
```
Follow the on-screen instructions to play the game. Players can take turns and enter their moves by entering the corresponding position number. The game will display the updated board after each move and determine the winner or a draw when applicable.
## Game Rules
1. The game is played on a 3x3 grid.
2. Two players take turns to mark a vacant cell with their respective symbols (X and O).
3. The objective is to get three of their symbols in a horizontal, vertical, or diagonal row.
4. The game ends when either one player achieves the winning condition or there are no more vacant cells left (a draw).
## Customize the Game
If you want to customize the game further, you can explore the source code files:
- `main.cpp`: Contains the main entry point and user interface logic.
Feel free to modify and enhance the code as per your requirements.
## Acknowledgements
The image used in this README is sourced from [Pinterest](https://i.pinimg.com/originals/d0/60/76/d060769c9561391e5ab09286b03ecc79.jpg). All rights belong to the original creator.
## License
This project is licensed under the [MIT License](LICENSE).