Ruby implementation of tic tac toe
This project was developed as a learning project part of the Microverse curriculum.
A Ruby implementation of Tic Tac Toe. In three steps we added the basic setup, the user interface and finally the logic behind the game. We used OOP to implement the game logic.
- Ruby
To get a local copy up and running follow these simple example steps.
Ruby installed locally
- [Download](Clone the repository to your machine)
$ git clone https://github.com/meronokbay/tic-tac-toe
-
Navigate to the project folder and execute the "bin/main.rb" file.
-
Type in bin/main.rb in the terminal.
- Find a friend to play with and run the program.
- Input both of your names and the program will select one of you to start.
- The selected player will be asked to input a number from 1 to 9 - each representing one field in the tic tac toe 3x3 grid.
- Afterwards the other player will select the next field which will be marked by another symbol.
- Selecting a field previously selected by anyone or inputting something besides an integer from 1 to 9 will not be accepted.
- You will keep alternating until a winner is declared or the game ends in a draw.
- First one to fill out a line with his three of his own symbols horizontally, vertically or diagonally wins!
To test this code download RSpec, access the repository using the terminal, write rspec and execute.
๐ค Marco Erhardt
- Github: @marcode95
๐ค Meron Ogbai
- Github: @meronokbay
- Twitter: @MeronDev
- Linkedin: Meron Ogbai
Contributions, issues and feature requests are welcome!
Give a โญ๏ธ if you like this project!
- Microverse for showing the way for this project to happen