Hastermind, the mastermind game written in Haskell, was created by Eduardo Lemos Rocha, Nothing But the Facts, and Justin Cummins, A.K.A Blockthrasher, as the final Haskell project for Emurgo Academy, and the first DApp360 Blockchain Developer Workforce Cohort. It follows typical Mastermind gameplay, but it is slightly modified.
- The codemaker (also called master) gains points when he provides feedback None to the code breakers.
- The codebreakers gain points from Black and White feedback from the code maker.
- Points are used to determine the winner if the game goes out of rounds.
In Hastermind a Master (player) creates a secret code (a series of colors).
The Master can choose how many colors the secret will have and how many rounds the players will be allowed to guess the secret code. Players then try to guess the colors (in order) of the secret code. The Master then marks Black for the correct color in the correct position, White for the correct color in the incorrect position, and None, for neither correct color nor position. If a player guesses all correct colors in the correct positions in the number of allotted rounds they win the game. Otherwise, the Master wins.
- Select the number of players.
- Enter player names.
- Select which player will be the Master.
- The Master decides how many colors (slots) the code will have.
- the Master must then enter the secret code (colors), and how many rounds will be played.
- Player One enters first guess.
- The Master enters feedback on Player One's guess. The Master enters Black for one token is both the correct color and in the right position. White for one token is the correct color but in the wrong position.
- The next player enters their guess.
- The Master evaluates.
- This continues as above until a player wins or runs out of attempts.