Mastermind in PHP with AJAX

Computer will choose a sequence of 4 out of 6 colors. Use the new game buttons to choose whether to allow repeated colors; default is no repeats. Allowing repeats does not guarantee them. Player must guess the sequence in no more than 12 tries. Each guess will be scored: green smile for each exact match, yellow neutral face for each partial match (correct color in the incorrect spot), red frown for each non-match (color not in final sequence). You will not be told which face goes with which spot! With duplication allowed, score is best possible without doubling up: e.g., if answer has blue in third place and guess has blue in first and third places, those blues will be scored as non-match and full match, respectively.

Loading Mastermind… please wait.

Leave any feedback on the blog post for this game.