We wrote our own version of one of the most iconic (and played) games in history: tic-tac-toe.
As this project is quite big, it required separate milestones with code reviews for each branch.
- Ruby!
- VsCode
To get a local copy up and running follow these simple example steps:
- Clone this repository into your local machine.
- Run the main file by typing this in your command line:
$ cd tic-tac-toe
$ cd bin
$ ruby main
This is a 2 player game.
Firstly, the program asks for each player's name and their preferred symbol which can be any keyboard character (we recommend letters or numbers).
Afterwards, the game begins presenting the tic-tac-toe board:
[1 2 3]
[4 5 6]
[7 8 9]
Now players need to take turns to put their symbol into the 9 legal positions, 1 at a time. A player symbol cannot overwrite the opposing player's symbol. Each move should be on different positions.
The goal of the game is to fill the positions with a player's symbol 3 times in a row.
The rows can be vertical, horizontal, and diagonal.
If no player can fill a row after all positions are filled, the game is considered a draw.
For instance:
[X 2 3]
[4 X 6]
[7 8 X]
Draw game example:
[o x o]
[x x o]
[x o x]
- Rubocop
- Stickler
👤 Elias Castañeda
👤 Miguel Tapia Escalera (Meltrust)
- Linkedin: @meltrust
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to anyone whose code was used
- Inspiration
- etc
This project is MIT licensed.