/Tic-Tac-Toe

Implementation of the tic-tac-toe game in ruby - command line

Primary LanguageRubyMIT LicenseMIT

Tic-Tac-Toe

Implementation of the tic-tac-toe game in ruby - command line. This is a two player game where one player have to put his/her pieces in a straight line either horizontally, vetically or diagonally while preventing the opponent by alligning his/her.

screenshot

screenshot

screenshot

Game Instructions (RULES FOR TIC-TAC-TOE)

  1. The game is played on a grid that's 3 squares by 3 squares.

  2. The first player is X, and the second player is O. Players take turns putting their marks in the numbered squares.

  3. The first player to get 3 of her marks in a row (up, down, across, or diagonally) is the winner.

  4. When all 9 squares are full, the game is over. If no player has 3 marks in a row, the game ends in a draw.

Getting Started 🚀

These instructions will get you a copy of the project up and running on your local machine.

How To Run the test 🔧

From your command line, first clone the project:

# Clone this repository
$ git clone https://github.com/kiptubei/Tic-Tac-Toe.git

# Go into the folder Tic-tac-toe where the game is present
$ cd Tic-Tac-Toe

# In command prompt, run the following command to test
$ rspec

How To Use 🔧

From your command line, first clone the project:

# Clone this repository
$ git clone https://github.com/kiptubei/Tic-Tac-Toe.git

# Go into the folder Tic-tac-toe where the game is present
$ cd Tic-Tac-Toe

# Navigate to bin folder
$ cd bin

# In command prompt, run the following command
$ ./main.rb

   Follow the prompts and enjoy the game!

Tools and technology used

  • Ruby 2.7.x
  • irb

CONTRIBUTOR

​👤 Mark James Kiptubei

👤 Dipesh Kumar

Github link:

For the: Github-link

Live Demo

Live Demo Link

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Thanks to Microverse and The Odin Project.