About | Installing | Built with | Authors
This project is meant for learning and implementing object oriented programming principles in Ruby.
- Ruby;
Clone and run this repository by running these commands on the terminal:
- git clone https://github.com/luciano-ilha/Tic-Tac-Toe;
- cd bin/
- Run ruby main
- There are only 2 players.
- The board has 9 empty cells
- There are 2 pieces of tokens β X and O
- Players take turns playing by entering their token into empty cells.
- The first player to get 3 of his/her tokens in a row (up, down, across, or diagonally) is the winner.
- The game ends in a draw if all 9 cells are occupied and there is no winner.
- Players take turns playing.
- 1st turn β Player 1
- Player 1 places their token (X) in only 1 square of their choice (it has to be between 1 and 9, can't be letters, negative numbers, or a position already taken by the other player).
- 2nd turn β Player 2.
- Player 2 places their token (O) in only 1 square of their choice, except they canβt touch the square that Player 1βs token already fills.
- 3rd turn- Player 1 β¦. and the cycle continue until a player wins or thereβs a tie game.
- There are 8 winning combinations: Top row, Middle row, Bottom row, Left column, Middle column, Right column, Left diagonal, and Right diagonal.
- Thereβs a draw/tie when the entire board is filled with Xβs and Oβs but no winning combinations can be found.
π€ Luciano Ilha
- Github: @luciano-ilha
- Twitter: @CarbonellIlha
- Linkedin: Luciano Ilha Carbonell
π€ Paul Ogolla
- Github: @paulzay
- Twitter: @paulzay
- Linkedin: Paul Ogolla
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a βοΈ if you like this project!
- Microverse and The Odin Project
This project is free to use as learning purposes. For any external content (e.g. logo, images, ...), please contact the proper author and check their license of use.