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