This project is part of the Microverse curriculum in Ruby module!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
This is the Microverse Tic-Tac-Toe project. In this project users can play game on the command line where two human players can play against each other and the board is displayed in between turns
This project was built using these technologies.
- Ruby
- Rubocop
- VsCode
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
To run the test you need to cd into the tic-tac-toe diretory and run:
rspec spec/
-
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
You can see it working here
👤 Jaspreet Singh
- LinkedIn: Jaspreet Singh -
- GitHub: @jaspreet-singh-sahota
- E-mail: jaspreetsinghjassi01@gmail.com
- Portfolio
👤 Alexandru Bangau
- LinkedIn: Alexandru Bangau
- GitHub: @rammazzoti2000
- E-mail: bangau.alexandru@gmail.com
- Portfolio: alex-portfolio.org
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐ if you like this project!
This project is MIT licensed.