https://github.com/anibalalpizar/cpp-tic-tac-toe
Tic Tac Toe Game is a C++ implementation of the classic game. Players mark spaces on a 3x3 grid to form lines. It features input validation, win tracking, and result display.
https://github.com/anibalalpizar/cpp-tic-tac-toe
console-application cpp tic-tac-toe
Last synced: 12 months ago
JSON representation
Tic Tac Toe Game is a C++ implementation of the classic game. Players mark spaces on a 3x3 grid to form lines. It features input validation, win tracking, and result display.
- Host: GitHub
- URL: https://github.com/anibalalpizar/cpp-tic-tac-toe
- Owner: anibalalpizar
- Created: 2023-07-11T00:35:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T04:08:57.000Z (almost 3 years ago)
- Last Synced: 2025-02-26T09:26:06.685Z (over 1 year ago)
- Topics: console-application, cpp, tic-tac-toe
- Language: C++
- Homepage:
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tic Tac Toe Game
This is a simple implementation of the classic Tic Tac Toe game in C++. The game allows two players to take turns marking spaces on a 3x3 grid. The objective is to be the first player to form a horizontal, vertical, or diagonal line with their marker (X or O).
The program features a command-line interface and includes the following functionalities:
- Displaying the game board after each move
- Validating player inputs and preventing invalid moves
- Checking for a winner or a tie game
- Keeping track of the number of wins for each player
- Viewing the results of previous games
- Quitting the program
How to Play
- Clone the repository to your local machine or download the source code files.
- Compile the code using a C++ compiler.
- Run the compiled program.
- Enter the names of the two players.
- Choose an option from the menu:
-
Play a game (Option 1): Play a round of Tic Tac Toe. -
View results (Option 2): Display the number of wins for each player. -
Quit (Option 3): Exit the program. - During the game, each player will take turns entering the row and column numbers of their desired move. The game board will be displayed after each move, and the program will determine the winner or a tie game. After the game ends, the winning player's number should be entered.