/tic-tac-toe

building a Tic Tac Toe Game

Primary LanguageRubyMIT LicenseMIT

Object Oriented Programming

Building the TIC TAC Toe Game

Contributors Forks Stargazers Issues


Logo

What is Tic Tac Toe

Tic-tac-toe is a game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.

Getting Started

To test the game, You have 2 options.

Test Online

To test the game online, click on this demo link.

Test on your local machine

  1. First off all, clone the repo on your local machine:

     git clone https://github.com/Datagirlcmr/Object-Oriented-Programming
    
  2. Open your terminal and go to the project root directory:

    cd Object-Oriented-Programming
    
  3. To run the game type:

    bin/main
    

The game will be initialized. Enjoy!.

Game Rules

  1. When the game starts, two players are prompted to provide their names.

  2. The players are prompted to choose the symbol of play; X or O By default, the second player gets the other symbol not chosen by the first player

  3. The board is then displayed as shown below

    position

  4. The player chooses between the available positions from 1 to 9.

  5. A position can not be chosen twice

  6. The first player to get his symbols aligned in a horizontal, vertical or diagonal row wins the game

  7. A draw occurs when all the positions on the board have been filled up, yet no player has been able to win.

  8. The Game ends when there is a win or a draw

  9. You can always choose to play again or quit the game.

Authors

Acknowledgements