Mastermind
|
The aim of this game is to guess the sequence of four colored pegs the computer has selected at random from the open trays on the right. First select which colors you want to play with. The defult set contains six colors, like the classic game. For obvious reasons you are not allowed to play with fewer than two colors. Clicking on a tray in the box on the right will toggle the cover over it, indicating whether it will be part of the set the computer draws from. Then press Start to begin. Start filling the holes at the bottom row with pegs, and each time you have completed a guess (i.e. filled all four holes) and pressed the Guess button the computer will respond by giving you one peg for each correct color - black if your guess was also in the right place, otherwise white. (But you will not be informed about which colors were correct. That part you will have to figure out for yourself.) If you haven't managed to guess the sequence by your tenth guess, the computer will reveal it to you and the game ends. |
1. Register and download the files
Before downloading the program you are requested to register yourself. There is no registration fee. If you register, you are allowed to use the program as a free software, and we will inform you about future upgrades.
You can download the files either in zip or in tgz format.
2. Include mastermind.js from the head of your page
Insert the following line into the head of your page:
<script src="mastermind.js"></script>
Call mmwr() where you want to see the image.
<script>mmwr()</script>
Or call mmwr(x, y) to define absolute coordinates.
<script>mmwr(100,100)</script>