Merge from vendor branch BIND:
[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 .\" $DragonFly: src/games/cribbage/cribbage.6,v 1.2 2003/06/17 04:25:23 dillon Exp $
35 .\"
36 .TH CRIBBAGE 6 "May 31, 1993"
37 .UC 4
38 .SH NAME
39 cribbage \- the card game cribbage
40 .SH SYNOPSIS
41 .B /usr/games/cribbage
42 [
43 .B \-req
44 ]
45 .I name ...
46 .SH DESCRIPTION
47 .I Cribbage
48 plays the card game cribbage, with the program playing one hand
49 and the user the other.  The program will initially ask the user if
50 the rules of the game are needed \- if so, it will print out
51 the appropriate section from
52 .I According to Hoyle
53 with
54 .I more (I).
55 .PP
56 .I Cribbage
57 options include:
58 .TP
59 .B \-e
60 When the player makes a mistake scoring his hand or crib, provide an
61 explanation of the correct score.  (This is especially useful for
62 beginning players.)
63 .TP
64 .B \-q
65 Print a shorter form of all messages \- this is only recommended for
66 users who have played the game without specifying this option.
67 .TP
68 .B \-r
69 Instead of asking the player to cut the deck, the program will randomly
70 cut the deck.
71 .PP
72 .I Cribbage
73 first asks the player whether he wishes to play a short game
74 (\*(lqonce around\*(rq, to 61) or a long game (\*(lqtwice around\*(rq, to 121).  A
75 response of `s' will result in a short game, any other response will
76 play a long game.
77 .PP
78 At the start of the first game, the program
79 asks the player to cut the deck to determine who gets the
80 first crib.  The user should respond with a number between 0 and
81 51, indicating how many cards down the deck is to be cut.  The player
82 who cuts the lower ranked card gets the first crib.
83 If more than one game is played, the
84 loser of the previous game gets the first crib in the current game.
85 .PP
86 For each hand, the program first prints the player's hand,
87 whose crib it is, and then asks the player
88 to discard two cards into the crib.  The cards are prompted for
89 one per line, and are typed as explained below.
90 .PP
91 After discarding, the program cuts the deck (if it is the player's
92 crib) or asks the player to cut the deck (if it's its crib); in the latter
93 case, the appropriate response is a number from 0 to 39 indicating
94 how far down the remaining 40 cards are to be cut.
95 .PP
96 After cutting the deck, play starts with the non-dealer (the person
97 who doesn't have the crib) leading the first card.
98 Play continues, as per cribbage, until all cards are exhausted.  The
99 program keeps track of the scoring of all points and the total of
100 the cards on the table.
101 .PP
102 After play, the hands are scored.  The program requests the player to
103 score his hand (and the crib, if it is his) by printing out the
104 appropriate cards (and the cut card enclosed in brackets).
105 Play continues until one player reaches the game limit (61 or 121).
106 .PP
107 A carriage return when a numeric input is expected is equivalent
108 to typing the lowest legal value; when cutting the deck this
109 is equivalent to choosing the top card.
110 .PP
111 Cards are specified as rank followed by suit.  The ranks may be specified
112 as one of:
113 `a', `2', `3', `4', `5', `6', `7', `8', `9', `t', `j', `q', and `k',
114 or alternatively, one of: \*(lqace\*(rq, \*(lqtwo\*(rq, \*(lqthree\*(rq, \*(lqfour\*(rq, \*(lqfive\*(rq, \*(lqsix\*(rq,
115 \*(lqseven\*(rq, \*(lqeight\*(rq, \*(lqnine\*(rq, \*(lqten\*(rq, \*(lqjack\*(rq, \*(lqqueen\*(rq, and \*(lqking\*(rq.
116 Suits may be specified as: `s', `h', `d', and `c', or alternatively as:
117 \*(lqspades\*(rq, \*(lqhearts\*(rq, \*(lqdiamonds\*(rq, and \*(lqclubs\*(rq.
118 A card may be specified as: <rank> \*(lq \*(rq <suit>, or: <rank> \*(lq of \*(rq <suit>.
119 If the single letter rank and suit designations are used, the space
120 separating the suit and rank may be left out.  Also, if only one card
121 of the desired rank is playable, typing the rank is sufficient.
122 For example, if your hand was \*(lq2H, 4D, 5C, 6H, JC, KD\*(rq and it was
123 desired to discard the king of diamonds, any of the following could be typed:
124 \*(lqk\*(rq, \*(lqking\*(rq, \*(lqkd\*(rq, \*(lqk d\*(rq, \*(lqk of d\*(rq, \*(lqking d\*(rq, \*(lqking of d\*(rq, \*(lqk diamonds\*(rq,
125 \*(lqk of diamonds\*(rq, \*(lqking diamonds\*(rq, or \*(lqking of diamonds\*(rq.
126 .SH FILES
127 .ta 2i
128 /usr/games/cribbage
129 .SH AUTHORS
130 Earl T. Cohen wrote the logic.
131 Ken Arnold added the screen oriented interface.