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
To get a local copy up and running follow these simple example steps:
- Go to https://github.com/mahbubul14/tic_toc_toe.git
- Click on the code, copy and clone to your local machine
- For usage ensure you have ruby installed
- Ruby
- Code-editor
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 in your local machine,
run ruby main
at the root of the project in the terminal. - Enter names of two players
- Players will take turns marking their spots on the board.
- Player 1 plays with "x"
- Player 2 plays with "0"
- 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.
👤 Mahbub Alam
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
👤 Oni Olajumoke Priscilla
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