Initial import from FreeBSD RELENG_4:
[dragonfly.git] / games / cribbage / cribbage.6
1 .\" Copyright (c) 1980, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)cribbage.6  8.1 (Berkeley) 5/31/93
33 .\" $FreeBSD: src/games/cribbage/cribbage.6,v 1.3 1999/08/27 23:28:59 peter Exp $
34 .\"
35 .TH CRIBBAGE 6 "May 31, 1993"
36 .UC 4
37 .SH NAME
38 cribbage \- the card game cribbage
39 .SH SYNOPSIS
40 .B /usr/games/cribbage
41 [
42 .B \-req
43 ]
44 .I name ...
45 .SH DESCRIPTION
46 .I Cribbage
47 plays the card game cribbage, with the program playing one hand
48 and the user the other.  The program will initially ask the user if
49 the rules of the game are needed \- if so, it will print out
50 the appropriate section from
51 .I According to Hoyle
52 with
53 .I more (I).
54 .PP
55 .I Cribbage
56 options include:
57 .TP
58 .B \-e
59 When the player makes a mistake scoring his hand or crib, provide an
60 explanation of the correct score.  (This is especially useful for
61 beginning players.)
62 .TP
63 .B \-q
64 Print a shorter form of all messages \- this is only recommended for
65 users who have played the game without specifying this option.
66 .TP
67 .B \-r
68 Instead of asking the player to cut the deck, the program will randomly
69 cut the deck.
70 .PP
71 .I Cribbage
72 first asks the player whether he wishes to play a short game
73 (\*(lqonce around\*(rq, to 61) or a long game (\*(lqtwice around\*(rq, to 121).  A
74 response of `s' will result in a short game, any other response will
75 play a long game.
76 .PP
77 At the start of the first game, the program
78 asks the player to cut the deck to determine who gets the
79 first crib.  The user should respond with a number between 0 and
80 51, indicating how many cards down the deck is to be cut.  The player
81 who cuts the lower ranked card gets the first crib.
82 If more than one game is played, the
83 loser of the previous game gets the first crib in the current game.
84 .PP
85 For each hand, the program first prints the player's hand,
86 whose crib it is, and then asks the player
87 to discard two cards into the crib.  The cards are prompted for
88 one per line, and are typed as explained below.
89 .PP
90 After discarding, the program cuts the deck (if it is the player's
91 crib) or asks the player to cut the deck (if it's its crib); in the latter
92 case, the appropriate response is a number from 0 to 39 indicating
93 how far down the remaining 40 cards are to be cut.
94 .PP
95 After cutting the deck, play starts with the non-dealer (the person
96 who doesn't have the crib) leading the first card.
97 Play continues, as per cribbage, until all cards are exhausted.  The
98 program keeps track of the scoring of all points and the total of
99 the cards on the table.
100 .PP
101 After play, the hands are scored.  The program requests the player to
102 score his hand (and the crib, if it is his) by printing out the
103 appropriate cards (and the cut card enclosed in brackets).
104 Play continues until one player reaches the game limit (61 or 121).
105 .PP
106 A carriage return when a numeric input is expected is equivalent
107 to typing the lowest legal value; when cutting the deck this
108 is equivalent to choosing the top card.
109 .PP
110 Cards are specified as rank followed by suit.  The ranks may be specified
111 as one of:
112 `a', `2', `3', `4', `5', `6', `7', `8', `9', `t', `j', `q', and `k',
113 or alternatively, one of: \*(lqace\*(rq, \*(lqtwo\*(rq, \*(lqthree\*(rq, \*(lqfour\*(rq, \*(lqfive\*(rq, \*(lqsix\*(rq,
114 \*(lqseven\*(rq, \*(lqeight\*(rq, \*(lqnine\*(rq, \*(lqten\*(rq, \*(lqjack\*(rq, \*(lqqueen\*(rq, and \*(lqking\*(rq.
115 Suits may be specified as: `s', `h', `d', and `c', or alternatively as:
116 \*(lqspades\*(rq, \*(lqhearts\*(rq, \*(lqdiamonds\*(rq, and \*(lqclubs\*(rq.
117 A card may be specified as: <rank> \*(lq \*(rq <suit>, or: <rank> \*(lq of \*(rq <suit>.
118 If the single letter rank and suit designations are used, the space
119 separating the suit and rank may be left out.  Also, if only one card
120 of the desired rank is playable, typing the rank is sufficient.
121 For example, if your hand was \*(lq2H, 4D, 5C, 6H, JC, KD\*(rq and it was
122 desired to discard the king of diamonds, any of the following could be typed:
123 \*(lqk\*(rq, \*(lqking\*(rq, \*(lqkd\*(rq, \*(lqk d\*(rq, \*(lqk of d\*(rq, \*(lqking d\*(rq, \*(lqking of d\*(rq, \*(lqk diamonds\*(rq,
124 \*(lqk of diamonds\*(rq, \*(lqking diamonds\*(rq, or \*(lqking of diamonds\*(rq.
125 .SH FILES
126 .ta 2i
127 /usr/games/cribbage
128 .SH AUTHORS
129 Earl T. Cohen wrote the logic.
130 Ken Arnold added the screen oriented interface.