Ruby's Tic-Tac-Toe Project
In this project, we have created a game of Tic-Tac-Toe using:
- Classes for board and player instances
- An Interface loop
- Win check method
- Turn input validity methods
- Player name validity check
- Restart method
- Download or clone the repository's files github repo
- Have Ruby 2.7 installed (to check if it is installed you can run: ruby -version in your console)
- Once repo is downloaded to local directory, in you console run cmd: ruby bin/main.rb
- Enjoy the game!
-
Tic-Tac-Toe is a two player game were each must try to place three of their tokens in a row, vertically, horizontally or diagonally, in a three by three board to win.
-
Game board will be displayed in a coordinate table from a to c (lines) and 1 to 3 (columns), Example input a1 will place token in the first line and first column.
-
At the beginning each player will be asked to input their name's and token of preference.
-
After which a random player will picked to start and place a token.
-
Each player take turns to place a token until one has won or the game is a draw
-
Once game is over player may restart by typing "y" in the console or exit by typing "n".
- Code editor: VsCode
- Language: Ruby
- Linters: Rubocop, Rspec
- Browser (Google Chrome, Mozilla Firefox, Safari or any other browser)
👤 Youcef Abdellani
- Github: @ABDELLANI-Youcef
- Twitter: @YoucefAbdellani
- Linkedin: linkedin
👤 Jurgen Clausen Gutierrez
- Github: @jurgen1c
- LinkedIn: jurgen-clausen
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Microverse
- GitHub
- TheOdinProject
- Ruby
This project is MIT licensed.