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.
-
The game is played on a grid that's 3 squares by 3 squares.
-
The first player is X, and the second player is O. Players take turns putting their marks in the numbered squares.
-
The first player to get 3 of her marks in a row (up, down, across, or diagonally) is the winner.
-
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.
These instructions will get you a copy of the project up and running on your local machine.
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
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!
- Ruby 2.7.x
- irb
👤 Mark James Kiptubei
👤 Dipesh Kumar
For the: Github-link
Give a ⭐️ if you like this project!
- Thanks to Microverse and The Odin Project.