From 57ecfc46bfddf680ad0c60420c5f352940ac0297 Mon Sep 17 00:00:00 2001 Message-Id: <57ecfc46bfddf680ad0c60420c5f352940ac0297.1714933352.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 12 Mar 2006 16:36:15 +0000 Subject: [PATCH] mm.6: Add a manpage. Organization: Straylight/Edgeware From: Mark Wooding --- Makefile.am | 2 ++ mm.6 | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 mm.6 diff --git a/Makefile.am b/Makefile.am index c6df28a..2f61c6c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,8 @@ AUTOMAKE_OPTIONS = foreign bin_PROGRAMS = mm +man_MANS = mm.6 + mm_SOURCES = mm.c ##----- That's all, folks --------------------------------------------------- diff --git a/mm.6 b/mm.6 new file mode 100644 index 0000000..a806fd5 --- /dev/null +++ b/mm.6 @@ -0,0 +1,32 @@ +.TH mm 6 "Mark Wooding" +.SH NAME +mm \- simple Mastermind game +.SH SYNOPSIS +.B mm +.RB [ \-CHS ] +.RI [ holes " " colours ] +.RI [ code ...] +.SH DESCRIPTION +The +.B mm +program plays the game of Mastermind. +.SS "About the game" +In the original game, there are a collection of coloured code pegs, and +a board. The board has a number of rows of holes. There are two +players. One player \(en the code setter \(en chooses a `code' \(en a +sequence of coloured pegs \(en and enters it at his end of the board, +concealed by a small screen from the other player. The other player +\(en the code guesser \(en attempts to guess the code. +.PP +In each turn, the guesser makes a guess by filling in a row of holes +with coloured pegs. The setter then +.I scores +the guess. He awards a black scoring peg for each peg in the guess +which matches the corresponding peg in the code, i.e., the right colour +in the right place. He awards a white scoring peg for each guess peg +which matches a code peg in colour but not in position, i.e., the right +colour in the wrong place. Each guess peg can be scored at most once. +.PP +The game ends either if the guesser guesses the code correctly, or if he +runs out of guessing rows on the board. +.SS " \ No newline at end of file -- [mdw]