The goal of the game is to crack the code wich consists of a number of colors (eg. RED-BLUE-BLACK-GREEN). After you've entered a code the computer will tell you the number of colors that where right AND in the right place, and the number of colors that exists somewhere in the code but were'nt on the right place. This is done in the form of black and white blocks: one black block means a color is in the right place and white means that the color exists in the code but in another place. This tells you only the number of right colors, not wich colors were right. You need to figure that out by yourself.
When you start Mastermind, you'll see a couple of things. The big yellow box on the left is the place where
you enter the codes. Click a color in the smaller green box on the bottom right and then click a pin in the yellow box to enter the color. When you've filled all pins, click confirm code. The computer now checks your
code and show you the number of right colors.
There are also 4 menu items. New game starts a new game, Options invokes the options dialog, Multiplayer shows you the Multiplayer options and Exit quits the game.
Mastermind has a couple of things that can be configured from the options dialog, wich can be opened by clicking "Options" in the main screen.
| Option | Explanation |
| Maximum number of code breaking attempts | How many times you can try to crack the code before you lose (1 to 16). |
| Maximum number of colors to use in code | The number of colors that will be used in a code (2 to 8). |
| Code length | The length of the code (2 to 8). Of course, a longer code is more difficult to crack. |
| Time limit | The amount of time (in seconds) that can elapse before you get a time-out and lose. Enter 0 for infinite time. |
| Enable sounds | Enables or disables sound effects (it also shuts down the sound system if toggled off and the sound system will not be initialized the next time you start Mastermind. Of course the sound system is restarted when you enable this again.) |
| Run fullscreen | Enables or disables full screen mode. |
| Nickname for multiplayer | This is your nickname that will be used for multiplayer over the internet. |
Mastermind offers two multiplayer modes: one wich allows to players to play on the same computer, and another one
wich allows to play against someone else over the internet. It's a turn-based game, wich means that Player 1 does
the first guess, Player 2 the second, Player 1 the third, etc etc. The player who is the first to crack the code
wins. If the maximum number of attempts is reached and nobody cracked the code, the codemaker - the computer in this case -
wins.
To bring up the multiplayer options, click Multiplayer in the main screen. If you want to play against someone else
on the same computer, select the same computer box and click start. If you want to play over the internet, select the internet box. You can chose to start a server, so another person can connect to your computer to play against you, or you can chose to connect to an already existing server. If that's the case, enter the IP adress of the computer you want to connect to and click start. You can also click disconnect to disconnect from the current multiplayer game (only useful when playing over the internet).
When in multiplayer over the internet, you can say something to the other player by pressing Ctrl+T (you can say up to 65 characters).
All network related functions can return error codes. Here are all codes and their meanings:
| Code | Description |
| 1 | Already connected. You should never see this. |
| 2 | Invalid socket. The call to socket() failed. |
| 3 | Gethostbyname() failed. This occurs when the IP adress you entered has an invalid format, eg 84.3324.22 |
| 4 | Connect() failed. Means the IP adress is valid, but it has no Mastermind server running. |
| 6 | Bind() failed. This usually means that port 9000 is already in use, so you can try again in a few minutes or shutdown the application that's using it. Also check if port 9000 is blocked and forward if neccesary. |
| 7 | Not connected. |
| 8 | Couldn't listen on socket. |
| 9 | Send() failed. Perhaps the other side (the person you are playing with) has clicked disconnect or closed Mastermind. |
| 10 | Select() failed. |
| 11 | Recv() failed. Perhaps the other side (the person you are playing with) has clicked disconnect or closed Mastermind. |
| 12 | Wrong netmode. You should never see this, unless there's a *really* stupid bug in my code. |
If you experience another problem, you can mail me at kipmans@gmail.com. Please include your operating system version, the version of Mastermind you're using (probably 1.0 as there is no other version yet :P), a description of the problem and how to reproduce it.
Mastermind is made by Kipmans.
Finally, I will include std_disclaimer.h, like almost every Allegro game does:
"I do not accept responsibility for any effects, adverse or otherwise, that this code may have on you, your computer, your sanity, your dog, and anything else that you can think of. Use it at your own risk."