This is a simple Tic-Tac-Toe game
- Ruby
- Rubocop
- Ubuntu
- Atom & VS Code
Here is the Live Demo Link
To get this project up and running locally, you must already have ruby installed on your computer.
To get this project set up on your local machine, follow these simple steps:
To get your own copy of our project simply clone the repository to your local machine.
Step 1: Type the following command into a git shell
git clone https://github.com/eypsrcnuygr/Tic-Tac-Toe.git
Step 2: Direct a terminal into the cloned repository directory
cd Tic-Tac-Toe
Step 3: create an executable file by following the steps as outlined here
Step 4: type main.rb
into the command line, open it in irb, or edit it in a text editor. If you chose to ignore step 3, type ruby bin/main.rb
. Alternatively if you would like to skip all of these steps, just click the live demo above.
Rule 1: The board is arranged in a grid from 1-9. The first row is 1-3, the second row is 4-6, and the third row is 7-9.
Rule 2: Players take turns selecting empty tiles.
Rule 3: The first player to fill 3 tiles in a row wins the game.
Step 1: After starting the program you will be prompted to choose either a human opponent or the cpu.
Step 2: Once an opponent is chosen, X's will go first (this will be you).
Step 3: Choose a position accordingly. After which, your opponent will do the same.
Step 4: Continue this process until either one player has 3 in a row or there are no squares left.
Step 5: The game will either declare a winner or end in a Cat's Game.
👤 Eyüp Sercan UYGUR
- Github: @eypsrcnuygr
- Twitter: @eypsrcnuygr
- LinkedIn: eypsrcnuygr
- Gmail: mailto:[email protected]
👤 Defoe Brandon
- Github: @defoebrand
- LinkedIn: Defoe Brandon
- Gmail: mailto:[email protected]
bin folder: User interface instructions are contained in the main.rb file found in this folder. All user inputs and game outputs will be shown here.
lib folder: All game logic instructions are found between the game.rb file and player.rb files found in this folder. The game.rb file contains the board and instructions on how the program should declare a winner. The player.rb file creates the two players and instructs the program on how to handle each player's move.
Contributions, issues and feature requests are welcome!
Give a ⭐️ if you like this project!
- This Project was part of an assignment available on The Odin Project.
- Our thanks to Microverse and all our peers and colleagues there.
This project is MIT licensed.