- Original project specification at The Odin Project
Tic-tac-toe (American English), noughts and crosses (British English), or Xs and Os is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game. From Wikipedia for more details about Tic-Tac-Toe.
- Ruby
- You can use this link if and skip straight to playing instructions for those who are impatient. Then hit the run button. Live Demo Link
- Clone or download(zip) this project from github using git clone https://github.com/dannkkie/tic-tac-toe
NOTE: for those on the live demo click run button otherwise for those using local environment continue with instructions below:
- Open a terminal window and go to game folder (cd ../tic-tac-toe/)
- Run the game, using command: bin/main
You will be presented with the following screen. Since this is a console based game, every move will be simulated by keyiing in data.
- Enter your player name, and let the other player enter their player name too
- The game automatically assigns the first player the X token and the second player the O token
- Follow the instructions on the user interface i.e enter the number of the grid where you would like to place your token i.e key a a number between 1 and 9.
- Do not place your token on a grid that is already chosen by the other player
- The first player to succeed in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!