Skip to content

tdenkinger/mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastermind

Mastermind is a code braking game. The "code maker" creates a "code" of four colored pegs, any number of the same color in any order. The "code breaker" then guesses the code.

Hints are given to the code breaker by the code maker. Black pegs indicate there is a peg of the correct corresponding color in the correct position. White pegs indicate there is a peg of the correct corresponding color but the peg is in the incorrect position.

When the code breaker guesses the exact order of the code, the game is over.

Peg colors: green, red, blue, yellow, purple, orange

Hint pegs:

black: correct color in the correct position
white: correct color in the incorrect position

For more: http://www.wikihow.com/Play-Mastermind

To play

Run iex -S mix

Mastermind.start

Enter four colors for your guess.

TODO

  1. Validate bad input and give meaningful error messages
  2. escript so iex isn't necessary

About

Elixir implementation of the Mastermind game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages