This project is part of the Microverse curriculum in Ruby module!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
This is the third project of the Microverse Ruby Module
This is also the first project of the Odin project curriculum
To play this game you need to:
- have ruby installed in your computer
- download or clone this repo:
- Clone with SSH:
git@github.com:adamclasic/tictactoe.git
- Clone with HTTPS
https://github.com/adamclasic/tictactoe.git
- and execute bin/main.rb file using your terminal
-
This is a customized version of the original tic-tac-toe game. The basic rules remain unchanged, the tokens to play with have changed instead.
-
The game is played on a 3 by 3 grid
X | X | X
----------------------
X | O | O
----------------------
X | X | X
- In this game, there are only two letters to play with 'X' and 'O'. Whichever player gets the first similar letters in an entire row, column or diagonal WINS!!!.
- At the begining of the game, player 1 will choose either 'X' or 'O' and the other letter will be assigned to player 2 automatically.
- Once the players both have letters to play with, they will use numbers 1 through 9 to select a position on the game board. for example:
Player playing with 'X' enters position '2'. 1 2 3 ------------- 1 | | X | | 3 ------------- 4 | | | | 6 ------------- 7 | | | | 9 ------------- 7 8 9 Player playing with 'O' enter position '5'. 1 2 3 ------------- 1 | | | | 3 ------------- 4 | | O | | 6 ------------- 7 | | | | 9 ------------- 7 8 9
- The first player to get their letters in a row (up, down, across, or diagonally) wins e.g.
X | O | O X | X | X X | O | O O | O | O ----------- ----------- ----------- ----------- X | X | O O | O | O X | X | O O | X | O ----------- ----------- ----------- ----------- X | X | X X | X | X O | O | O O | X | O
-
When all squares are full and no player has won, then game ends in as a Draw e.g.
O | X | O ---------------------- O | X | X ---------------------- X | O | O
This project was built using these technologies.
- Ruby
- Rspec
If you wish to test it. Install Rspec
with gem install rspec
. We used rspec 3.9.1
but any version not older than 3.0
should work fine. Clone this repo to your local machine, cd into tictactoe directory and run rspec
You can see it working here
👤 Phillip Musiime
- LinkedIn: Phillip Musiime
- GitHub: PhillipUg
- Twitter: @Phillip_Ug
- E-mail: phillipmusiime@gmail.com
👤 Abderrahmane Adam Allalou
- LinkedIn: Abderrahmane Adam Allalou
- GitHub: @adamclasic
- E-mail: aabou9@gmail.com
This project is MIT licensed.