The Mastermind Game and Minimax Algorithm Written for the Odin Project!
Let's Play Mastermind!
The computer is the mastermind! They have created a top secret code that you must crack. You are the code breaker. You must use wits and strategy to break the code! With each guess you make, hints are given as to how close your guess was! Your guess is made by placing four colored pegs on the board. The mastermind will then give you colored clues:
A red clue:
Each red clue means you have placed the correct color, and its in the correct position!
A green clue:
Each green clue means you have placed the correct color, but its not in the correct position! You have 10 turns to guess the code! If you guess the code before your time runs out, you win!
- Playing Mastermind against the computer
- A minimax algorithm to crack the users code
- Difficulty selection
- Ruby 2.6.5 (or higher)
Clone the repo to your local machine using the terminal:
$ git clone git@github.com:andrewbaldwin44/Mastermind_Ruby_Game.git
- Navigate into the project directory
cd Mastermind_Ruby_Game - Run the demo
ruby main.rb
- Donald Kuth's 5 guess algorithm
- Minimax Algorithm Pseudocode
- Beating Mastermind, Adam Forsyth, RubyConf 2018
👤 Andrew Baldwin
- Github: @andrewbaldwin44
