Building a tic-tac-toe game on the command line(windows) / terminal(mac & linux) where two human players can play against each other and the board is displayed in between turns.
Full task description here
The Tic Tac Toe game is played on a board with 9 fields. The first player place three pieces in column based, row based or diagonal order wins. Each player picks a symbol, X or O. In this case , player one gets to be X and Player two is O. Each player takes turns and first to place pieces as mentioned wins the game. If the board is full then it is a match draw.
-
Begin by executing the file main inside the repositories /bin folder.
-
An instruction board is shown in order to specify the places on the board
- 1 | 2 | 3
- 4 | 5 | 6
- 7 | 8 | 9
-
Follow the prompts
-
Enter players names and continue
-
Selections must correspond to the numbers shown above. If user types '1' when turn reached, their piece will be placed at position one on the board
- X | _ | _
- _ | _ | _
- _ | _ | _
Note: The goal is to be the first to place pieces in the orders mentioned, below shows how player two wins
-
X | O | X
-
X | O | _
-
_ | O | X
-
The game prompts for a response of weather you wish to continue or not once there is a win or draw. The game exits if user wants to quit or viceversa if yes is selected
- Ruby
- VSCode
- Terminal
- Rubocop
The project was designed to test capalities of implementing Object Oriented Program using Ruby
-
Ruby Enviroment: if you do not have ruby installed visit this link to install
-
Terminal(Mac & Linux) or Command Prompt(Windows): run the main file located in the bin folder $ ruby main
👤 Elbie Moonga
- GitHub: @Elbie-Em
- Twitter: ElbieEm
- LinkedIn: elbie-moonga
👤 Rafael Nazario
- Github: @rsnazario
- Twitter: @rsnazario
- Linkedin: Rafael Nazario
Contributions, issues are welcome!