1 .\" Copyright (c) 1980, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
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.4 2008/04/16 08:29:21 swildner Exp $
41 .Nd the card game cribbage
47 plays the card game cribbage, with the program playing one hand
48 and the user the other.
49 The program will initially ask the user if the rules of the game are
50 needed \(en if so, it will print out the appropriate section from
51 .Em According to Hoyle
57 .Bl -tag -width ".Fl e"
59 When the player makes a mistake scoring his hand or crib, provide an
60 explanation of the correct score.
61 (This is especially useful for beginning players.)
63 Print a shorter form of all messages \(en this is only recommended for
64 users who have played the game without specifying this option.
66 Instead of asking the player to cut the deck, the program will randomly
71 first asks the player whether he wishes to play a short game
78 will result in a short game, any other response will play a long game.
80 At the start of the first game, the program
81 asks the player to cut the deck to determine who gets the first crib.
82 The user should respond with a number between 0 and
83 51, indicating how many cards down the deck is to be cut.
84 The player who cuts the lower ranked card gets the first crib.
85 If more than one game is played, the
86 loser of the previous game gets the first crib in the current game.
88 For each hand, the program first prints the player's hand,
89 whose crib it is, and then asks the player
90 to discard two cards into the crib.
91 The cards are prompted for one per line, and are typed as explained below.
93 After discarding, the program cuts the deck (if it is the player's
94 crib) or asks the player to cut the deck (if it's its crib); in the latter
95 case, the appropriate response is a number from 0 to 39 indicating
96 how far down the remaining 40 cards are to be cut.
98 After cutting the deck, play starts with the non-dealer (the person
99 who doesn't have the crib) leading the first card.
100 Play continues, as per cribbage, until all cards are exhausted.
101 The program keeps track of the scoring of all points and the total of
102 the cards on the table.
104 After play, the hands are scored.
105 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).
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.
114 Cards are specified as rank followed by suit.
115 The ranks may be specified
131 or alternatively, one of:
146 Suits may be specified as:
158 A card may be specified as:
159 .Dq Ao rank Ac \ Aq suit ,
161 .Dq Ao rank Ac of Aq suit .
162 If the single letter rank and suit designations are used, the space
163 separating the suit and rank may be left out.
164 Also, if only one card
165 of the desired rank is playable, typing the rank is sufficient.
166 For example, if your hand was
167 .Dq 2H, 4D, 5C, 6H, JC, and KD
168 and it was desired to discard the king of diamonds, any of
169 the following could be typed:
180 .Sq king of diamonds .
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
192 added the screen oriented interface.