项目作者: AhmedAmin90
项目描述 :
In this project I created a Tic Tac Toe game using Ruby.
高级语言: Ruby
项目地址: git://github.com/AhmedAmin90/Tic-Tac-Toe.git
Tic-Tac-Toe
In this project I created a Tic Tac Toe game using Ruby.
Built with:
Game Rules:
The game is played on a grid that’s 3 squares by 3 squares.
One of the player is X and the second player is O. Players take turns putting their marks in the squares.
The player who succeeds in placing three of their marks in a diagonal, horizontal, or vertical row 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 draw.
The game instructions:
These are the game instructions:
- The board contains 9 boxes each box has its nubmer from 1 to 9.
- The player one will have X sign.
- The player two will have O sign.
- Each player has to select a number on the board between 1 and 9. The number automatically will change to the sign of the player (X or O).
- If the player select a number outside the range or a position is already taken, the game will show that the player need to select another number.
- The player who succeeds in placing three of their marks in a diagonal, horizontal, or vertical row is the winner.
- When all 9 squares are full, the game is over. If no player has success condition, the game ends in a draw.
Setup:
- To run this project locally, please ensure you have Ruby installed on your machine, then clone this repository by running.
git clone https://github.com/Wusinho/Tic-Tac-Toe
- After cloning open the file and go to bin directory then open the terminal and write in terminal :
ruby main.rb
Maximize your terminal window for a better experience.
Enjoy the game!
The game screenshot :

Live preview :
@AhmedAmin3/Tic-Tac-Toe-Game">Live Demo Link
Author:
👤 Ahmed Amin
Show your support
Give a ⭐️ if you like this project!
Acknowledgments
📝 License
This project is MIT licensed.