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.





Screen 1 of 2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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).












Screen 2 of 2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------------------------------
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.





Screen 1 of 3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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.



Screen 2 of 3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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.



Screen 3 of 3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------------------------------
ProgramInfo

The Program Mastermind--Coding, Guessing and Scoring

There is, of course, no reason why both the Codemaker and the Codebreaker in
a game of Mastermind have to be human! Enter the Mastermind program, which can
play the part of either Codemaker or Codebreaker and let you play the other.

If you are familiar with the original game of Mastermind (either from having
played it or from having selected items 2 and 3 from the main menu of this
program, then it is an easy matter to make the transition to coding, guessing
and scoring in Mastermind, the computer version.

In the original Mastermind, 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. In the Mastermind program, these colored pegs are simply
replaced by digits from the set {1, 2, ..., 8}, and a "peg position" becomes
simply a digit position within the code. However, since no confusion should
arise, we shall continue to use the "color" and "peg" terminology. Also, in this
version, the code size is fixed at four pegs.




Screen 1 of 3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



In the original Mastermind, 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.

In the Mastermind program, a score is always entered (and displayed) as a
two-digit number; that is, even if the leading digit is a zero, this zero must
be entered (and will be printed). A moment's thought should convince you that
the maximum value of the sum of these two digits is equal to the size of the
code (i.e., the number of digits in the code).

In the Mastermind program, of course, the terminal screen replaces the decoding
board of the original game. Guesses are listed down the screen from top to
bottom, and scores are placed on the same line as the guesses to which they
apply.






Screen 2 of 3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


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.



Screen 3 of 3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------------------------------
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 type in EXACTLY TWO
DIGITS WITH NO SPACES BETWEEN THEM. And remember:

1) The first of your score digits is the number of my guess digits that are
   correct and in the correct position.

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

Got it? OK. First, write down your secret code, choosing four digits from
the set { 1, 2, 3, 4, 5, 6, 7, 8 }, and keeping in mind that repetitions
are allowed.






!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------------------------------
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 digits
from the set { 1, 2, 3, 4, 5, 6, 7, 8 }. Be sure to type the four digits
with no spaces between them, and 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 first of the score digits is the number of your guess digits that are
   correct AND in the correct position.

2) The second of the score digits is the number of your 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: UserScoredIncorrectly


        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.
