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