Mastermind in JavaScript


 
Active Colour
Active
Colour
Scroll Up to select another colour
Select
Colour
Scroll Down to select another colour
 
 

Score the current row
 

Show me the solution
and start a new game.
 

Leave Mastermind
 
 
  Objective: Try to guess the secret code of coloured pegs.

Scoring: You get one small black peg for a guess of the right colour in the right location and one small white peg for a guess of of the right colour but in the wrong position. The relative locations of the scoring (small black & white) pegs does not necessarily reveal which pegs in your guess are correct.

     Scoring Examples

How to Play:

  1. Select a coloured peg from the tray, either by clicking on the arrow buttons, or clicking on a suitable colour in the tray. The colour you will use is indicated by the object labelled Active Colour.
  2. Starting at the top row, place a coloured peg in each of the large holes. Just click on the hole to place a peg of the Active Colour.
  3. You can change the colour of any peg in the current row (before clicking Score) by selecting a new Active Colour, and clicking on the peg you want to change.
  4. Click Score to see how closely your guess matches the secret pattern. See the section above (Scoring) with help interpreting the results.
  5. Proceed to the next row using the information provided by the scoring of previous rows.
  6. When your guess matches the secret pattern, the game will tell you that you have solved the puzzle.
  7. If after turns you still have not matched the secret pattern, the game will offer to show it to you.
  8. You may click Give Up at any time to see the secret pattern.
  9. To leave the game completely, click Quit.
     Strategy & Tips

Disclaimer: "Mastermind" is the intellectual property of Invicta Toys and Games, Ltd., UK. This script is an unofficial, not-for-profit version and neither it nor this site is endorsed by Invicta or its agents in any way.