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:rammazzoti2000/tic-toc-toe.git
- Clone with HTTPS
https://github.com/rammazzoti2000/tic-toc-toe.git
- and execute bin/main.rb file using your terminal
-
This is a customized version of the original tic-tac-toe game. Tha basic rules remain unchanged, the tokens to play with have changed instead.
-
The game is played on a 3 by 3 grid
1 | 2 | 3
----------------------
4 | 5 | 6
----------------------
7 | 8 | 9
- The tokens you will play with in this game version will be "rum" and "vodka". While the first player will have the option to choose from the given tokens, the second player will have the token automatically assigned.
- Each player will take turns putting their assigned token in empty squares.
Player 1 turn - "rum" rum | 2 | 3 ---------------------- 4 | 5 | 6 ---------------------- 7 | 8 | 9 Player 2 turn - "vodka" rum | 2 | 3 ---------------------- 4 | 5 | 6 ---------------------- vodka | 8 | 9
- The first player to get 3 tokens in a row (up, down, across, or diagonally) wins.
Winning combinations (W is either "rum" or "vodka"). W | W | W 1 | 2 | 3 1 | 2 | 3 W | 2 | 3 1 | W | 3 1 | 2 | W W | 2 | 3 1 | 2 | W ----------- ----------- ----------- ----------- ----------- ----------- ----------- ----------- 4 | 5 | 6 W | W | W 4 | 5 | 6 W | 5 | 6 4 | W | 6 4 | 5 | W 4 | W | 6 4 | W | 6 ----------- ----------- ----------- ----------- ----------- ----------- ----------- ----------- 7 | 8 | 9 7 | 8 | 9 W | W | W W | 8 | 9 7 | W | 9 7 | 8 | W 7 | 8 | W W | 8 | 9
-
When all 9 squares are full, the game is over. If no player has 3 marks in a row, the game ends and nobody wins.
rum | vodka | rum ---------------------- rum | vodka | vodka ---------------------- vodka | rum | rum
This project was built using these technologies.
- Ruby
- Rubocop
- VsCode
You can see it working here
👤 Jaspreet Singh
- LinkedIn: Jaspreet Singh -
- GitHub: @jaspreet-singh-sahota
- E-mail: jaspreetsinghjassi01@gmail.com
👤 Alexandru Bangau
- LinkedIn: Alexandru Bangau
- GitHub: @rammazzoti2000
- E-mail: bangau.alexandru@gmail.com
This project is MIT licensed.