mm_textitems.txt
File of text items for the Mastermind program.
========================================
GameInfo

Mastermind--The Idea of the Game

Mastermind is a game of skill in which two players engage in a battle of wits
and logic. One of the players, the "Codemaker", chooses a secret code which the
other player, the "Codebreaker", must then attempt to discover.

A "move" in the game of Mastermind consists of the following two steps:

1) The Codebreaker supplies a "guess" for the secret code hidden by the
   Codemaker.

2) The Codemaker then "scores" the guess against the actual code and provides
   the Codebreaker with this score.

The idea is that each successive score will give the Codebreaker more
information about the hidden code, so that successive guesses become more
and more "educated", until the identity of the secret code is determined.


Generally, the Codebreaker is limited to a fixed number of guesses. There may
be a penalty if the Codebreaker fails to guess the secret code before this fixed
number of guesses is exceeded and/or a bonus if the correct guess is made within
a certain (small) number of guesses.

There are many variations of the game. A standard one is the version in which
the players agree in advance to exchange the roles of Codemaker and Codebreaker
a given number of times. The winner is the player with the smaller total number
of guesses (or the larger total number if the points (i.e., the guesses) are
"awarded" to the Codemaker).
----------------------------------------
GameOrigins

The Original Game of Mastermind--Coding, Guessing and Scoring

In the original, non-computer version of Mastermind the necessary equipment
includes the following:

First
A "decoding board", containing (usually ten) rows of holes for the "coding
pegs" and "scoring pegs" (or "key pegs", as the scoring pegs are often called).
Each of these rows contains a number of large holes for the coding pegs and
an equal number of smaller holes for the scoring pegs, adjacent to the larger
holes. For a given board this number is usually either four or five. The board
also has a special row containing just four (or five) of the larger holes. The
secret code is placed in this row.

Second
A shield that either sits on or plugs into the decoding board and hides the
Codemaker's secret code from the Codebreaker.


Third
A quantity of colored coding pegs which fit the larger holes, usually a dozen
or so of either six or eight different colors (excluding both black and white).

Fourth
About forty or fifty (depending on whether each row of the board contains four
or five holes of each size) smaller scoring pegs, divided equally between black
and white.

In this original version, the Codemaker chooses colored pegs for his code and
places them in the holes behind the shield. The Codebreaker then chooses colored
pegs for his guess and inserts these pegs into the first of the "guess rows".

The Codemaker compares the guess with his secret code and indicates to the
Codebreaker his score for that guess by inserting the appropriate number of
black and/or white pegs into the smaller holes.

Scoring is really quite straightforward if one is careful; at the same time,
it is easy to make mistakes if one is not careful. Scoring proceeds as follows.


The Codemaker compares the guess with his secret code and notes the
following two things:

First
The number of pegs that match in both color and position in the two
codes (referred to as "exact matches").

Second
The number of pegs which match only in color but not in position
in the two codes (referred to as "color matches only").

The Codemaker then inserts in the smaller holes opposite the guess a
number of black pegs equal to the number of exact matches and a number
of white pegs equal to the number of color matches only. This is the
"score" used by the Codebreaker to aid him in making subsequent guesses,
which proceed similarly.

Important Note: You must remember that each peg in a guess is matched up
with only *one* peg in the secret code (if possible) and vice versa.
----------------------------------------
ProgramInfo

The Program Mastermind--Coding, Guessing and Scoring


Codes are formed by using large colored pegs, with up to eight different colors
allowed and the size of the code is usually either four or five pegs.

Scores are indicated by using smaller black and white pegs to indicate,
respectively, the number of exact matches and the number of color matches only.


Play Options and Rules

The Mastermind program offers essentially just two different play options.
As a user, you can request the computer to:

1) be the Codemaker any number of times in a row, or

2) be the Codebreaker any number of times in a row

One of the endearing features of the game of Mastermind is that it is a game
with few rules. In fact, once you understand the basic mechanics of the game,
there are virtually no additional "rules", in the usual sense of the term,
to learn.

Nevertheless, despite its outward lack of complexity in the form of rules,
Mastermind will often require all of the ingenuity you can muster when you
are the Codebreaker, and even as Codemaker you must keep your wits about you
at all times while scoring.
----------------------------------------
CodemakerRules

In this game you are the Codemaker and I am the Codebreaker. So that you know
that I can't cheat I won't ask you to enter your secret code! I will, however,
ask you to score very carefully since there is no way of backtracking once an
error has been made. Remember, each time you score, to enter the right color.

1) The black color of your score is the number of my guess colors that are
correct and in the correct position.

2) The white color of your score is the number of my guess digits that are
correct but not in the correct position.
----------------------------------------
CodebreakerRules

Since I am to be the Codemaker and you are to be the Codebreaker, you must
provide the guesses. Remember that each guess must consist of four colors
from the set of 8 colors. Remember that repetitions are allowed.

Remember also that you have a maximum of ten guesses!

Finally, when you see your score remember that:


1) The black color of your score is the number of my guess colors that are
correct and in the correct position.

2) The white color of your score is the number of my guess digits that are
correct but not in the correct position.
----------------------------------------
Apology


        Uh oh! I seem to have used up all of my guesses!

----------------------------------------
Error

        Something seems to be wrong!
        Are you sure you scored correctly?
        Check your scoring and then ...

----------------------------------------
RandomCodeEntryOrGenerationRules

You may now choose to enter your own random code or have the program itself
generate one.  If you enter one, be careful since you have only one chance to
get it right.  Be sure to input a 4-digit integer with all digits taken from
the set { 1, 2, 3, 4, 5, 6, 7, 8 }.

If you are Codebreaker, the "random" code you enter will be the computer's
"secret code", while if you are the Codemaker the "random" code you enter will
be the computer's initial guess as it tries to determine your secret code.

----------------------------------------
========================================
This line at the end of the file is simply ignored.
