mm.6: Add a manpage.
[mm] / mm.6
1 .TH mm 6 "Mark Wooding"
2 .SH NAME
3 mm \- simple Mastermind game
4 .SH SYNOPSIS
5 .B mm
6 .RB [ \-CHS ]
7 .RI [ holes " " colours ]
8 .RI [ code ...]
9 .SH DESCRIPTION
10 The
11 .B mm
12 program plays the game of Mastermind.
13 .SS "About the game"
14 In the original game, there are a collection of coloured code pegs, and
15 a board. The board has a number of rows of holes. There are two
16 players. One player \(en the code setter \(en chooses a `code' \(en a
17 sequence of coloured pegs \(en and enters it at his end of the board,
18 concealed by a small screen from the other player. The other player
19 \(en the code guesser \(en attempts to guess the code.
20 .PP
21 In each turn, the guesser makes a guess by filling in a row of holes
22 with coloured pegs. The setter then
23 .I scores
24 the guess. He awards a black scoring peg for each peg in the guess
25 which matches the corresponding peg in the code, i.e., the right colour
26 in the right place. He awards a white scoring peg for each guess peg
27 which matches a code peg in colour but not in position, i.e., the right
28 colour in the wrong place. Each guess peg can be scored at most once.
29 .PP
30 The game ends either if the guesser guesses the code correctly, or if he
31 runs out of guessing rows on the board.
32 .SS "