Code Breaker - A Strategy Game for Linux ------------------------------------------ by Michael Berg <mberg@nmt.edu> Code Breaker is a variation on the game "MasterMind" (R) that is put out by Pressman (R). So if you know how to play "MasterMind" (R) you should catch onto this game right away. If you don't know how to play, here are the rules: Code Breaker has three skill levels to choose from under (what else but) the "Skill Level" menu: Beginner: codes contain any of 6 colors (1,296 possible codes). Intermediate: codes contain any of 7 colors (2,401 possible codes). Advanced: codes contain any of 8 colors (4,096 possible codes). Whenever a new game is started, the computer generates a random color code from the available colors (6 - 8 depending on skill level). Multiple uses of the same color are allowed in the color code. It is your goal as the player to crack this code in 10 guesses or less. Start by selecting a color from the "Colors" panel in the lower right corner of the game screen. Your selected color will be displayed in the window at the bottom of the "Colors" panel. After selecting a color, click on a button in the lowest unused row of buttons in the center game area to set its color to your selected color. You can keep the current color or select a new color from the "Color" panel, and then set the colors of other buttons. Repeat this process until all the buttons in the current row have a color assigned to them. You can also change the color of any button before you finalize your guess by clicking the "Guess" button. Once you are happy with your guess at the secret code, click the "Guess" button. The computer will compare your guess to the secret code, and two numbers will appear to the left of your guess and below the "Key" area. The number in the column below the Black "Key" indicates how many of the colors in your guess are the right color and in the right position. The number in the column below the White "Key" indicates how many of the colors in your guess are the right color but in the wrong position. For example, if the secret code is: White Red Blue Yellow And your guess was: Blue Red Green White The result would be a 1 under the black "Key" for the Red button that is the right color and in the right position, and a 2 under the white "Key" for the Blue and White buttons that are right colors but in the wrong positions. If two or more instances of the same color are in the secret code or in your guess, a black value will take precidence over white value. For example, if the secret code is: Black Black Green Red And your guess was: Green Blue Green Yellow The result would be a 1 under the black "Key" and a 0 under the white "Key", since the Green third button is the right color in the right position and no other colors match. Using this information, you try to deduce which colors (if any) are correct, and which position they should go in. You then fill in the next row of buttons with your color choices as before and click the "Guess" button again. This process continues until you either correctly guess the code (in which case you win the game), or you use all ten guesses without cracking the code (in which case you lose). Either way, the secret code will be revealed for your inspection.