If you’ve never played Mastermind, a game where you have to guess your opponent’s secret code within a certain number of turns (like hangman with colored pegs), check it out on Wikipedia. Each turn you get some feedback about how good your guess was – whether it was exactly correct or just the correct color but in the wrong space.
Description provided by The Odin Project
I have not yet learned how to bundle gems. You will need the colorize gem installed on your machine before you try to run this.
- Open your command-line
- Type $
gem install colorize
- Now proceed to follow the instructions below.
- First, make sure you have the colorize gem installed.
- Clone or download a copy of this repo onto your machine.
- Open your command-line and cd into the directory where you have downloaded these files.
- Play the game by typing $
ruby play_game.rb