"Tic Tac Toe" and "Noughts and crosses" redirect here. For other uses, see Tic Tac Toe (disambiguation) and Noughts and crosses (disambiguation). Tic-tac-toe Tic tac toe.svg A completed game of tic-tac-toe Genre(s) Paper-and-pencil game Players 2 Setup time Minimal Playing time ~1 minute Random chance None Skill(s) required Strategy, tactics, observation Synonym(s) Noughts and crosses Xs and Os Tic-tac-toe (American English), noughts and crosses (Commonwealth English), or Xs and Os/“X’y O’sies” (Ireland), 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 diagonal, horizontal, or vertical row is the winner. It is a solved game with a forced draw assuming best play from both players. more
- 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 the labelled cells.
- The first player to get 3 of the marks in a row (up, down, across, or diagonally) is the winner.
- When all 9 cells are full, the game is over. If no player has 3 marks in a row, the game ends in a tie.
To get a local copy up and running follow these simple example steps.
- Clone the repository on local machine by open cmd or terminal
git clone https://github.com/RyelBanfield/Tic-Tac-Toe.git
Or press green button Code > Download ZIP - Extract the file and navigate to the bin direcory.
cd Tic-Tac-Toe
cd bin
- Run the game by
./main.rb
- After running the game enter the player 1 name.
- Enter the player 2 name.
- You have 3x3 grid and each cell has a number.
- Choose an available number and press Enter.
👤 Ryel Banfield
- GitHub: @RyelBanfield
- Twitter: @RyelBanfield
- LinkedIn: RyelBanfield
👤 Author2
- GitHub: @Bishoy-Samwel
- LinkedIn: Bishoy Samwel
- Twitter: @bisho
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
- etc
This project is MIT licensed.