In this project we have recreated the well known Tic-Tac-Toe game by using object oriented programming paradigm. We had 5 milestones as below:
- Miltestone 1 - Basic initial setups and linter configurations.
- Miltestone 2 - CLI user interface is implemented.
- Miltestone 3 - Game logic is implemented and the main user interface moved to Main class.
- Miltestone 4 - Instructions and Rules for game
- Miltestone 5 - Unit Tests with Rspec for classes and methods.
- Two players can start game by entering their names
- Player names should contain at least one letter
- Game board consists of 3 by 3 grid and 9 locations.
- x sign for game belongs to Player1 and o sign belongs to Player2
- No player can put move in a place which is already filled
- Game board will check if a player wins after every move
- If no player wins it's a draw
- Ruby,
- Rubocop
Besides the live demo link, you can run those functions in you own local environment.
Type ./bin/main.rb
in the root file of the project.
You can also type ruby bin/main.rb
in the root file of the project.
All public methods are tested with Rspec.
- Open a terminal window and type
rspec
- All tests should be passed:
-
In order to run, you need to install RUBY in your computer. For windows you can go to Ruby installer and for MAC and LINUX you can go to Ruby official site for intructions on how to intall it. Then you can clone the project by typing
git clone https://github.com/RaminMammadzada/ruby-tic-tac-toe-game/tree/develop
-
The game was tested using RSpec which is a ruby testing tool.
- In a terminal window type
gem install rspec
- Once rspec install has finished, go to project directory and type
rspec --init
- You will see a folder spec and a file .rspec
- Inside spec folder you'll see a spec_helper.rb file.
- In a terminal window type
👤 Ramin Mammadzada
- Github: @RaminMammadzada
- Twitter: @RaminMammadzada
- Linkedin: @RaminMammadzada
👤 Sajjad Ahmad
- Github: @githubhandle
- Twitter: @twitterhandle
- Linkedin: linkedin
👤 Abdellani Youcef
- Github: @ABDELLANI-Youcef
- Twitter: @YoucefAbdellani
- Linkedin: linkedin
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Microverse
- Odin project
This project is MIT licensed.