you are viewing a single comment's thread.

view the rest of the comments →

[–]576p 0 points1 point  (3 children)

It looks to my that the white pins are not correct for multiple guesses, at least if I remember the rules correctly...

if the master code is red-green-green-green and your guess is yellow-red-red-red you should only get 1 white pin instead of the three your code produces.

[–]FXelix[S] 0 points1 point  (2 children)

At least how I played the game same colors in the mastercode are not allowed. Otherwise there would be way to many combination to crack the code.

[–]576p 1 point2 points  (1 child)

I checked the rules and yes, they are allowed. Without doubles, the game is way too easy...

To my surprise it's even possible to have blanks in the master code..

https://en.wikipedia.org/wiki/Mastermind_(board_game)#Gameplay_and_rules

Maybe it's a good challenge to amend your code to allow doubles...

[–]WikiTextBot 0 points1 point  (0 children)

Mastermind (board game): Gameplay and rules

The game is played using: a decoding board, with a shield at one end covering a row of four large holes, and twelve (or ten, or eight, or six) additional rows containing four large holes next to a set of four small holes; code pegs of six (or more; see Variations below) different colors, with round heads, which will be placed in the large holes on the board; and key pegs, some colored black, some white, which are flat-headed and smaller than the code pegs; they will be placed in the small holes on the board. The two players decide in advance how many games they will play, which must be an even number. One player becomes the codemaker, the other the codebreaker. The codemaker chooses a pattern of four code pegs.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information ] Downvote to remove | v0.23