Tic-Tac-Toe is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid.
The goal of this project is to bring to practice the main concepts of Object-Oriented Programming. Particularly classes and access to their attributes.
An early variation of tic-tac-toe was played in the Roman Empire, around the first century BC. It was called terni lapilli (three pebbles at a time) and instead of having any number of pieces, each player only had three, thus they had to move them around to empty spaces to keep playing. The game's grid markings have been found chalked all over Rome. Another closely related ancient game is three men's morris which is also played on a simple grid and requires three pieces in a row to finish, and Picaria, a game of the Puebloans. wiki/Tic-tac-toe
- Ruby
- Install on Your Own Machine. You can skip the linter setup if you don't want to validate the code against good coding standards.
- Open the terminal command line.
- git clone https://github.com/pipe2442/Tic-Tac-Toe-Ruby
- cd Tic-Tac-Toe-Ruby
- Enter main on command terminal to start the game.
- Enter your and your partner's name. Player 1 is automatically assign 'X' symbol and Player 2 'O' symbol.
- Choose charater 1 to 9 to start the game.
- You win when 3 of your symbols align vertically, horizontally or diagonally.
- if players marked the 9 slots in the board without 3 symbols aligned as the win scenarios the game will be marked as a draw.
👤 Luis Angulo
- GitHub: @pipe2442
- Twitter: @donCodigo_
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Ruby Programming on The Odin Project Tic-Tac-Toe.
- Object Oriented Programming concepts for Ruby
This project is MIT licensed.