]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - cribbage/cribbage.6
WARNSify
[bsdgames-darwin.git] / cribbage / cribbage.6
1 .\" $NetBSD: cribbage.6,v 1.5 1997/10/10 12:32:26 lukem Exp $
2 .\"
3 .\" Copyright (c) 1980, 1993
4 .\" The Regents of the University of California. All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the University of
17 .\" California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" SUCH DAMAGE.
33 .\"
34 .\" @(#)cribbage.6 8.1 (Berkeley) 5/31/93
35 .\"
36 .Dd May 31, 1993
37 .Dt CRIBBAGE 6
38 .Os
39 .Sh NAME
40 .Nm cribbage
41 .Nd the card game cribbage
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl eqr
45 .Sh DESCRIPTION
46 .Nm
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 .Em According to Hoyle
52 with
53 .Xr more 1 .
54 .Pp
55 .Nm
56 options include:
57 .Bl -tag -width indent
58 .It Fl 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 .It Fl q
63 Print a shorter form of all messages \- this is only recommended for
64 users who have played the game without specifying this option.
65 .It Fl r
66 Instead of asking the player to cut the deck, the program will randomly
67 cut the deck.
68 .El
69 .Pp
70 .Nm
71 first asks the player whether he wishes to play a short game (
72 .Dq once around ,
73 to 61) or a long game (
74 .Dq twice around ,
75 to 121). A
76 response of
77 .Sq Ic s
78 will result in a short game, any other response will
79 play a long game.
80 .Pp
81 At the start of the first game, the program
82 asks the player to cut the deck to determine who gets the
83 first crib. The user should respond with a number between 0 and
84 51, indicating how many cards down the deck is to be cut. The player
85 who cuts the lower ranked card gets the first crib.
86 If more than one game is played, the
87 loser of the previous game gets the first crib in the current game.
88 .Pp
89 For each hand, the program first prints the player's hand,
90 whose crib it is, and then asks the player
91 to discard two cards into the crib. The cards are prompted for
92 one per line, and are typed as explained below.
93 .Pp
94 After discarding, the program cuts the deck (if it is the player's
95 crib) or asks the player to cut the deck (if it's its crib); in the latter
96 case, the appropriate response is a number from 0 to 39 indicating
97 how far down the remaining 40 cards are to be cut.
98 .Pp
99 After cutting the deck, play starts with the non-dealer (the person
100 who doesn't have the crib) leading the first card.
101 Play continues, as per cribbage, until all cards are exhausted. The
102 program keeps track of the scoring of all points and the total of
103 the cards on the table.
104 .Pp
105 After play, the hands are scored. The program requests the player to
106 score his hand (and the crib, if it is his) by printing out the
107 appropriate cards (and the cut card enclosed in brackets).
108 Play continues until one player reaches the game limit (61 or 121).
109 .Pp
110 A carriage return when a numeric input is expected is equivalent
111 to typing the lowest legal value; when cutting the deck this
112 is equivalent to choosing the top card.
113 .Pp
114 Cards are specified as rank followed by suit. The ranks may be specified
115 as one of:
116 .Sq a ,
117 .Sq 2 ,
118 .Sq 3 ,
119 .Sq 4 ,
120 .Sq 5 ,
121 .Sq 6 ,
122 .Sq 7 ,
123 .Sq 8 ,
124 .Sq 9 ,
125 .Sq t ,
126 .Sq j ,
127 .Sq q ,
128 and
129 .Sq k ,
130 or alternatively, one of:
131 .Sq ace ,
132 .Sq two ,
133 .Sq three ,
134 .Sq four ,
135 .Sq five ,
136 .Sq six ,
137 .Sq seven ,
138 .Sq eight ,
139 .Sq nine ,
140 .Sq ten ,
141 .Sq jack ,
142 .Sq queen ,
143 and
144 .Sq king .
145 Suits may be specified as:
146 .Sq s ,
147 .Sq h ,
148 .Sq d ,
149 and
150 .Sq c ,
151 or alternatively as:
152 .Sq spades ,
153 .Sq hearts ,
154 .Sq diamonds ,
155 and
156 .Sq clubs .
157 A card may be specified as:
158 .Dq Ao rank Ac \ Aq suit ,
159 or:
160 .Dq Ao rank Ac of Aq suit .
161 If the single letter rank and suit designations are used, the space
162 separating the suit and rank may be left out. Also, if only one card
163 of the desired rank is playable, typing the rank is sufficient.
164 For example, if your hand was
165 .Dq 2H, 4D, 5C, 6H, JC, and KD
166 and it was desired to discard the king of diamonds, any of
167 the following could be typed:
168 .Sq k ,
169 .Sq king ,
170 .Sq kd ,
171 .Sq k d ,
172 .Sq k of d ,
173 .Sq king d ,
174 .Sq king of d ,
175 .Sq k diamonds ,
176 .Sq k of diamonds ,
177 .Sq king diamonds ,
178 .Sq king of diamonds .
179 .Sh FILES
180 .Bl -tag -width /usr/games/cribbage -compact
181 .It Pa /usr/games/cribbage
182 .El
183 .Sh AUTHORS
184 Earl T. Cohen wrote the logic.
185 Ken Arnold added the screen oriented interface.