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