The game has two players. Each Player should have a unique name. The game is a table that has values from one (1) to nine (9). The first player's move is converted to 'X' and the second player's move is converted to '0'. The player should not pick a number that has already been converted to either 'X' or '0'. If they do, they get an error message and a prompt to enter another value.
The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row, as shown in the images below, is the winner.
When all the nine (9) squares are marked the game is over. If no player has three marks in a row, the game ends in a tie
You can only restart a game after a win or when the game ends in a tie. When the game is over, you will get options to either restart or end the game between the current players.
Ruby
Rose Wanjohi
-
Github: @blackpintz
-
Twitter: @blackpintz
Odong Sunday
-
Github: @OdongAlican
-
Twitter: @odongsandie
-
Linkedin: Sunday Alican odong
Contributions, issues and feature requests are welcome! Start by:
- Forking the project
- Cloning the project to your local machine
cd
into the project directory- Run
git checkout -b your-branch-name
- Make your contributions
- Push your branch up to your forked repository
- Open a Pull Request with a detailed description to the development branch of the original project for a review
Give a โญ๏ธ if you like this project!