B3TA-BLOCKER / Tic-Tac-Toe-Game

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐ŸŽฎ 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.

License:MIT License


Languages

Language:C++ 100.0%