Ruby
This is a microverse project. Click to know more about Microverse. Remember Tic Tac Toe? See Wikipedia if you can’t remember the rules, or if you haven’t ever played. It involves a couple of players, a simple board, checking for victory in a game loop… all the conditions that make it a fun little problem to solve using our newfound OOP sea legs. Let’s build it!
Build a tic-tac-toe game on the command line where two human players can play against each other and the board is displayed in between turns.
- Think about how you would set up the different elements within the game… What should be a class? Instance variable? Method? A few minutes of thought can save you from wasting an hour of coding.
- Build your game, taking care to not share information between classes any more than you have to.
- Post your solution below, then check out the example solution provided.
- i. INSTALL GIT AND RUBY ON YOUR MACHINE | Dowload git from here lastest version https://git-scm.com/downloads, and ruby from here https://www.ruby-lang.org/en/downloads/
- ii. OPEN TERMINAL | Go to the dir that you wana save your files
- iii. CLONE THE REPO | On cmd type: 'git clone https://github.com/R4Ajeti/Tic-Tac-Toe.git'
- iv. RUN THE CODE: On cmd type: 'ruby main.rb'
- v. ENJOY PLAYING AND REPORT BUG: Report bug on r4ajeti@gmail.com
:¨·.·¨: :¨·.·¨:
·. ƮϦαɳk Ψөu .·