A tic-tac-toe game on the command line where two human players can play against each other and the board is displayed in between turns, created with Ruby.
- Ruby
- Test: Rubocop
- For usage ensure you have ruby installed
- Text editor
- GitHub
- Git
- Click on the
Code
green button - By the right end of the read-only input containing the repository link click the clipboard icon to copy the link
- In your local PC, open your terminal in the folder you would like to clone the repository into
- Clone the repository with the command:
git clone (copied link)
; like so:git clone https://github.com/1v4n4/TicTacToe
- After the clone, type in the command
cd TicTacToe
to access the directory on the terminal
It is a game played by two players where they choose random numbers between 1 to 9. The first player takes X and the second player takes O. The first player who matches three spots in a horizontal, vertical, or diagonal row is the winner. When the spots on the board are all marked with no matches, then, the game ends in a draw.
- After clonning the project, run ./bin/main.rb at the root of the project in the terminal.
- Enter names of two players, first player will play with X and the second with O.
- Players will take turns marking their spots on the board.
- The first player who matches three spots in a horizontal, vertical, or diagonal row. is the winner.
- When the spots on the board are all marked with no matches, then, the game ends in a draw.
- GitHub: @danmainah
- Twitter: @Danmainah
- LinkedIn: @Daniel-Maina
Contributions, issues, and feature requests are welcome!
Give a ⭐️ if you like this project!