A game in which two players take turns putting circles and crosses on a 3x3 grid and try to get three of the same symbols following the game rules.
In order to organize the code it was used different files, one for the game logic, another one for the player information, and the main file to get the user's input and provide an output when a player wins or it has a draw game. All movements for both players are displayed inside a (3X3) grid.
- Ruby
Install git following the instructions available at Git
Clone the repository typing the command below on your preferred terminal
git clone https://github.com/marcelomaidden/ruby-milestone-setup
After you have cloned the repository, enter the directory typing
cd ruby-milestone-setup
Install ruby following the instructions available at Ruby
Then run the command below
ruby bin/main.rb
-
The game is played on a grid that's 3 squares by 3 squares.
-
You are X, your friend is O. Players take turns putting their marks in empty (nil) 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 tie.
Marcelo Araújo
- GitHub: @marcelomaidden
- Twitter: @marcelomaidden
- LinkedIn: Marcelo Fernandes de Araújo
- Ruby creators
Contributions, issues, and feature requests are welcome!
Give a ⭐️ if you like this project!
This project is MIT licensed.