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