]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - backgammon/backgammon/backgammon.6
11b268c1e9a8e89992a94d79131396c1491b3d83
[bsdgames-darwin.git] / backgammon / backgammon / backgammon.6
1 .\" $NetBSD: backgammon.6,v 1.6 1997/10/10 08:59:35 lukem Exp $
2 .\"
3 .\" Copyright (c) 1980, 1993
4 .\" The Regents of the University of California. All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the University of
17 .\" California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" SUCH DAMAGE.
33 .\"
34 .\" @(#)backgammon.6 8.1 (Berkeley) 5/31/93
35 .\"
36 .Dd May 31, 1993
37 .Dt BACKGAMMON 6
38 .Os
39 .Sh NAME
40 .Nm backgammon
41 .Nd the game of backgammon
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl
45 .Op Fl nrwb
46 .Op Fl pr
47 .Op Fl pw
48 .Op Fl pb
49 .Op Fl t Ar term
50 .Op Fl s Ar file
51 .Sh DESCRIPTION
52 This program lets you play backgammon against the computer
53 or against a "friend".
54 All commands only are one letter,
55 so you don't need to type a carriage return,
56 except at the end of a move.
57 The program is mostly self documenting,
58 so that a question mark (?) will usually get some help.
59 If you answer `y' when the program asks if you want the rules,
60 you will get text explaining the rules of the game,
61 some hints on strategy,
62 instruction on how to use the program,
63 and a tutorial consisting of a practice game against the computer.
64 A description of how to use the program can be
65 obtained by answering `y' when it asks if you want instructions.
66 .Pp
67 The possible arguments for backgammon
68 (most are unnecessary but some are very convenient)
69 consist of:
70 .Bl -tag -width indent
71 .It Fl n
72 don't ask for rules or instructions
73 .It Fl r
74 player is red (implies n)
75 .It Fl w
76 player is white (implies n)
77 .It Fl b
78 two players, red and white (implies n)
79 .It Fl pr
80 print the board before red's turn
81 .It Fl pw
82 print the board before white's turn
83 .It Fl pb
84 print the board before both player's turn
85 .It Fl t Ar term
86 terminal is type
87 .Ar term ,
88 uses
89 .Pa /usr/share/misc/termcap
90 .It Fl s Ar file
91 recover previously saved game from
92 .Ar file .
93 (This can also be done by executing the saved file,
94 i.e., typing its name in as a command)
95 .El
96 .Pp
97 .\"
98 .\" Arguments may be optionally preceded by a `-'.
99 .\" Several arguments may be concatenated together,
100 .\" but not after `s' or `t' arguments,
101 .\" since they can be followed by an arbitrary string.
102 Any unrecognized arguments are ignored.
103 An argument of a lone `-' gets a description of possible arguments.
104 .Pp
105 If
106 .Ar term
107 has capabilities for direct cursor movement (see
108 .Xr termcap 5 )
109 .Nm
110 ``fixes'' the board after each move,
111 so the board does not need to be reprinted,
112 unless the screen suffers some horrendous malady.
113 Also, any `p' option will be ignored.
114 (The `t' option is not necessary unless the terminal type does not match
115 the entry in the
116 .Pa /usr/share/misc/termcap
117 data base.)
118 .Sh QUICK REFERENCE
119 When the program prompts by typing only your color,
120 type a space or carriage return to roll, or
121 .Bl -tag -width indent
122 .It Ic d
123 to double
124 .It Ic p
125 to print the board
126 .It Ic q
127 to quit
128 .It Ic s
129 to save the game for later
130 .El
131 .Pp
132 When the program prompts with 'Move:', type
133 .Bl -tag -width indent
134 .It Ic p
135 to print the board
136 .It Ic q
137 to quit
138 .It Ic s
139 to save the game
140 .El
141 .Pp
142 or a
143 .Em move ,
144 which is a sequence of
145 .Bl -tag -width indent
146 .It Ic s-f
147 move from
148 .Ic s
149 to
150 .Ic f
151 .It Ic s/r
152 move one man on
153 .Ic s
154 the roll
155 .Ic r
156 separated by commas or spaces and ending with a newline.
157 Available abbreviations are
158 .Bl -tag -width indent
159 .It Ic s-f1-f2
160 means
161 .Ic s-f1,f1-f2
162 .It Ic s/r1r2
163 means
164 .Ic s/r1,s/r2
165 .El
166 .El
167 .Pp
168 Use
169 .Ic b
170 for bar and
171 .Ic h
172 for home,
173 or 0 or 25 as appropriate.
174 .Sh AUTHOR
175 Alan Char
176 .Sh FILES
177 .Bl -tag -width /usr/share/misc/termcap -compact
178 .It Pa /usr/games/teachgammon
179 rules and tutorial
180 .It Pa /usr/share/misc/termcap
181 terminal capabilities
182 .El
183 .Sh BUGS
184 The program's strategy needs much work.