sumancrest0001 / ruby-tic-tac-toe

This is the third project of the Microverse ruby course and have to develop a tic tack toe game using OOP concept.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RUBY-TIC-TAC-TOE

This is the third project of the Microverse ruby course and we have to develop a simple tic-tac-toe game using OOP concept.

.

LANGUAGE USED

Ruby

GETTING STARTED

Follow the following instruction to install the game in you local machine.

  1. Open the git from the directory in which you want to install the game.
  2. Download all the related files using command 'git clone https://github.com/sumancrest0001/tic-tac-toe.git'
  3. After that, Navigate to the ruby-tic-tac-toe folder.
  4. Run a command 'bin/main.rb'
  5. You can enjoy the game.

INSTRUCTION TO PLAYE THE GAME.

If you are familiar with the game then you can just enjoy the game. But if you have not played the game before then you can follow the instructions below and can play immediately.

  • At most, only two players can play the game at a time.
  • The board is of 3x3 grid and contains nine cells.
  • Each player mark one cell at a time.
  • Both the players mark their cell alternatively until the game ends.
  • No one is allowed to mark the cell which is already marked.
  • There are two possible ways to end the game.
  • One is when one player wins the game or when the game is a draw.
  • If one player is able to mark all the cells of a single row, column or diagonal
  • Then that player wins the game.
  • The game will be draw if no one wins the game and all the cells are marked out.

Steps to play the game

  1. First of all, one player chooses a mark (X or O). It will automatically assign remaining mark to another player.
  2. Player1, always starts the game and choose a mark.
  3. Next, Player2 chooses a mark from the remaining cells.
  4. If players try to choose already marked cells then it will show warning to the player and have to choose again.
  5. This process will continue till the game is end.
  6. You can play the game again by pressing "Y" and end the game with "N".
  7. It won't accept other than "Y" and "N".

CONTRIBUTOR

sumancrest0001 (https://github.com/sumancrest0001)

LICENSE

MIT licensed.

About

This is the third project of the Microverse ruby course and have to develop a tic tack toe game using OOP concept.

License:MIT License


Languages

Language:Ruby 100.0%