date and time created 85/05/30 19:13:39 by sklower
[unix-history] / usr / src / games / cribbage / cribbage.6
CommitLineData
5ffc51f0
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
76aad035 5.\" @(#)cribbage.6 6.1 (Berkeley) %G%
5ffc51f0 6.\"
76aad035 7.TH CRIBBAGE 6 ""
5ffc51f0
KM
8.UC 4
9.SH NAME
10cribbage \- the card game cribbage
11.SH SYNOPSIS
12.B /usr/games/cribbage
13[
efbb7ae1
KM
14.B \-req
15]
16.I name ...
5ffc51f0
KM
17.SH DESCRIPTION
18.I Cribbage
19plays the card game cribbage, with the program playing one hand
20and the user the other. The program will initially ask the user if
efbb7ae1 21the rules of the game are needed \- if so, it will print out
5ffc51f0
KM
22the appropriate section from
23.I According to Hoyle
24with
25.I more (I).
26.PP
27.I Cribbage
28options include:
29.TP
30.B \-e
31When the player makes a mistakes scoring his hand or crib, provide an
32explanation of the correct score. (This is especially useful for
33beginning players.)
34.TP
35.B \-q
efbb7ae1 36Print a shorter form of all messages \- this is only recommended for
5ffc51f0
KM
37users who have played the game without specifying this option.
38.TP
39.B \-r
40Instead of asking the player to cut the deck, the program will randomly
41cut the deck.
42.PP
43.I Cribbage
44first asks the player whether he wishes to play a short game
45(\*(lqonce around\*(rq, to 61) or a long game (\*(lqtwice around\*(rq, to 121). A
46response of `s' will result in a short game, any other response will
47play a long game.
48.PP
49At the start of the first game, the program
50asks the player to cut the deck to determine who gets the
51first crib. The user should respond with a number between 0 and
5251, indicating how many cards down the deck is to be cut. The player
53who cuts the lower ranked card gets the first crib.
54If more than one game is played, the
55loser of the previous game gets the first crib in the current game.
56.PP
57For each hand, the program first prints the player's hand,
58whose crib it is, and then asks the player
59to discard two cards into the crib. The cards are prompted for
60one per line, and are typed as explained below.
61.PP
62After discarding, the program cuts the deck (if it is the player's
63crib) or asks the player to cut the deck (if it's its crib); in the later
64case, the appropriate response is a number from 0 to 39 indicating
65how far down the remaining 40 cards are to be cut.
66.PP
67After cutting the deck, play starts with the non-dealer (the person
68who doesn't have the crib) leading the first card.
69Play continues, as per cribbage, until all cards are exhausted. The
70program keeps track of the scoring of all points and the total of
71the cards on the table.
72.PP
73After play, the hands are scored. The program requests the player to
74score his hand (and the crib, if it is his) by printing out the
75appropriate cards (and the cut card enclosed in brackets).
76Play continues until one player reaches the game limit (61 or 121).
77.PP
78A carriage return when a numeric input is expected is equivalent
79to typing the lowest legal value; when cutting the deck this
80is equivalent to choosing the top card.
81.PP
82Cards are specified as rank followed by suit. The ranks may be specified
83as one of:
84`a', `2', `3', `4', `5', `6', `7', `8', `9', `t', `j', `q', and `k',
85or alternatively, one of: \*(lqace\*(rq, \*(lqtwo\*(rq, \*(lqthree\*(rq, \*(lqfour\*(rq, \*(lqfive\*(rq, \*(lqsix\*(rq,
86\*(lqseven\*(rq, \*(lqeight\*(rq, \*(lqnine\*(rq, \*(lqten\*(rq, \*(lqjack\*(rq, \*(lqqueen\*(rq, and \*(lqking\*(rq.
87Suits may be specified as: `s', `h', `d', and `c', or alternatively as:
88\*(lqspades\*(rq, \*(lqhearts\*(rq, \*(lqdiamonds\*(rq, and \*(lqclubs\*(rq.
89A card may be specified as: <rank> \*(lq \*(rq <suit>, or: <rank> \*(lq of \*(rq <suit>.
90If the single letter rank and suit designations are used, the space
91separating the suit and rank may be left out. Also, if only one card
92of the desired rank is playable, typing the rank is sufficient.
93For example, if your hand was \*(lq2H, 4D, 5C, 6H, JC, KD\*(rq and it was
94desired to discard the king of diamonds, any of the following could be typed:
95\*(lqk\*(rq, \*(lqking\*(rq, \*(lqkd\*(rq, \*(lqk d\*(rq, \*(lqk of d\*(rq, \*(lqking d\*(rq, \*(lqking of d\*(rq, \*(lqk diamonds\*(rq,
96\*(lqk of diamonds\*(rq, \*(lqking diamonds\*(rq, or \*(lqking of diamonds\*(rq.
97.SH FILES
98.ta 2i
99/usr/games/cribbage
efbb7ae1
KM
100.SH AUTHORS
101Earl T. Cohen wrote the logic.
102Ken Arnold added the screen oriented interface.