xref: /dragonfly/games/cribbage/cribbage.6 (revision c03f08f3)
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.\" $DragonFly: src/games/cribbage/cribbage.6,v 1.3 2007/03/11 19:05:31 swildner Exp $
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
47plays the card game cribbage, with the program playing one hand
48and the user the other.
49The program will initially ask the user if the rules of the game are
50needed \(en if so, it will print out the appropriate section from
51.Em According to Hoyle
52with
53.Xr more 1 .
54.Pp
55.Nm
56options include:
57.Bl -tag -width ".Fl e"
58.It Fl e
59When the player makes a mistake scoring his hand or crib, provide an
60explanation of the correct score.
61(This is especially useful for beginning players.)
62.It Fl q
63Print a shorter form of all messages \(en this is only recommended for
64users who have played the game without specifying this option.
65.It Fl r
66Instead of asking the player to cut the deck, the program will randomly
67cut the deck.
68.El
69.Pp
70.Nm
71first asks the player whether he wishes to play a short game (
72.Dq once around ,
73to 61) or a long game (
74.Dq twice around ,
75to 121).
76A response of
77.Sq Ic s
78will result in a short game, any other response will play a long game.
79.Pp
80At the start of the first game, the program
81asks the player to cut the deck to determine who gets the first crib.
82The user should respond with a number between 0 and
8351, indicating how many cards down the deck is to be cut.
84The player who cuts the lower ranked card gets the first crib.
85If more than one game is played, the
86loser of the previous game gets the first crib in the current game.
87.Pp
88For each hand, the program first prints the player's hand,
89whose crib it is, and then asks the player
90to discard two cards into the crib.
91The cards are prompted for one per line, and are typed as explained below.
92.Pp
93After discarding, the program cuts the deck (if it is the player's
94crib) or asks the player to cut the deck (if it's its crib); in the latter
95case, the appropriate response is a number from 0 to 39 indicating
96how far down the remaining 40 cards are to be cut.
97.Pp
98After cutting the deck, play starts with the non-dealer (the person
99who doesn't have the crib) leading the first card.
100Play continues, as per cribbage, until all cards are exhausted.
101The program keeps track of the scoring of all points and the total of
102the cards on the table.
103.Pp
104After play, the hands are scored.
105The program requests the player to
106score his hand (and the crib, if it is his) by printing out the
107appropriate cards (and the cut card enclosed in brackets).
108Play continues until one player reaches the game limit (61 or 121).
109.Pp
110A carriage return when a numeric input is expected is equivalent
111to typing the lowest legal value; when cutting the deck this
112is equivalent to choosing the top card.
113.Pp
114Cards are specified as rank followed by suit.
115The ranks may be specified
116as one of:
117.Sq a ,
118.Sq 2 ,
119.Sq 3 ,
120.Sq 4 ,
121.Sq 5 ,
122.Sq 6 ,
123.Sq 7 ,
124.Sq 8 ,
125.Sq 9 ,
126.Sq t ,
127.Sq j ,
128.Sq q ,
129and
130.Sq k ,
131or alternatively, one of:
132.Sq ace ,
133.Sq two ,
134.Sq three ,
135.Sq four ,
136.Sq five ,
137.Sq six ,
138.Sq seven ,
139.Sq eight ,
140.Sq nine ,
141.Sq ten ,
142.Sq jack ,
143.Sq queen ,
144and
145.Sq king .
146Suits may be specified as:
147.Sq s ,
148.Sq h ,
149.Sq d ,
150and
151.Sq c ,
152or alternatively as:
153.Sq spades ,
154.Sq hearts ,
155.Sq diamonds ,
156and
157.Sq clubs .
158A card may be specified as:
159.Dq Ao rank Ac \  Aq suit ,
160or:
161.Dq Ao rank Ac of Aq suit .
162If the single letter rank and suit designations are used, the space
163separating the suit and rank may be left out.
164Also, if only one card
165of the desired rank is playable, typing the rank is sufficient.
166For example, if your hand was
167.Dq 2H, 4D, 5C, 6H, JC, and KD
168and it was desired to discard the king of diamonds, any of
169the following could be typed:
170.Sq k ,
171.Sq king ,
172.Sq kd ,
173.Sq k d ,
174.Sq k of d ,
175.Sq king d ,
176.Sq king of d ,
177.Sq k diamonds ,
178.Sq k of diamonds ,
179.Sq king diamonds ,
180.Sq king of diamonds .
181.Sh FILES
182.Bl -tag -width ".Pa /usr/share/games/cribbage.instr" -compact
183.It Pa /usr/games/cribbage
184.It Pa /var/games/criblog
185.It Pa /usr/share/games/cribbage.instr
186.El
187.Sh AUTHORS
188.An -nosplit
189.An Earl T. Cohen
190wrote the logic.
191.An Ken Arnold
192added the screen oriented interface.
193