Skip to content

This code is a simple Tic-Tac-Toe game where two players take turns entering numbers on a 3x3 grid. It checks for a winning condition and displays the winner.

License

Notifications You must be signed in to change notification settings

B3TA-BLOCKER/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic-Tac-Toe Game

Welcome to the Tic-Tac-Toe Game! 🚀 This simple console-based game allows two players to engage in the classic tic-tac-toe challenge. The game keeps track of each player's score and announces the winner or declares a draw after each round.

How to Play

  1. The game starts by prompting the players to enter their names.
  2. The tic-tac-toe board is displayed, and Player 1 (X) begins the game.
  3. Players take turns entering a number (1 to 9) to place their symbol on the board.
  4. The game checks for a winner or a draw after each move.
  5. The winner or draw is announced, and players have the option to play again.

🎮 Game Controls

  • Use the numbers 1 to 9 to place your symbol on the corresponding position on the board.
  • Follow on-screen instructions during your turn. 🎲

📜 Game Rules

  • The first player to form a horizontal, vertical, or diagonal line with their symbol wins.
  • The game ends in a draw if no player achieves victory.

🚀 Clone and Use Tic-Tac-Toe Game

  • Step 1: Clone the Repository

    Open your terminal and run the following command to clone the repository:

    git clone https://github.com/B3TA-BLOCKER/Tic-Tac-Toe-Game.git
  • Step 2: Navigate to the Project folder

    cd Tic-Tac-Toe-Game
  • Step 3: Compile the Source Code

    g++ main.cpp -o main
  • Step 4: Execute the program

    ./main

About

This code is a simple Tic-Tac-Toe game where two players take turns entering numbers on a 3x3 grid. It checks for a winning condition and displays the winner.

Topics

Resources

License

Stars

Watchers

Forks

Languages