1.\"	$NetBSD: backgammon.6,v 1.9 2002/09/26 18:31:58 wiz 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
52This program lets you play backgammon against the computer
53or against a "friend".
54All commands only are one letter, so you don't need to type a carriage return,
55except at the end of a move.
56The program is mostly self documenting,
57so that a question mark (?) will usually get some help.
58If you answer `y' when the program asks if you want the rules,
59you will get text explaining the rules of the game, some hints on strategy,
60instruction on how to use the program,
61and a tutorial consisting of a practice game against the computer.
62A description of how to use the program can be
63obtained by answering `y' when it asks if you want instructions.
64.Pp
65The possible arguments for backgammon
66(most are unnecessary but some are very convenient)
67consist of:
68.Bl -tag -width indent
69.It Fl n
70don't ask for rules or instructions
71.It Fl r
72player is red (implies n)
73.It Fl w
74player is white (implies n)
75.It Fl b
76two players, red and white (implies n)
77.It Fl pr
78print the board before red's turn
79.It Fl pw
80print the board before white's turn
81.It Fl pb
82print the board before both player's turn
83.It Fl t Ar term
84terminal is type
85.Ar term ,
86uses
87.Pa /usr/share/misc/termcap
88.It Fl s Ar file
89recover previously saved game from
90.Ar file .
91.El
92.Pp
93.\"
94.\" Arguments may be optionally preceded by a `-'.
95.\" Several arguments may be concatenated together,
96.\" but not after `s' or `t' arguments,
97.\" since they can be followed by an arbitrary string.
98Any unrecognized arguments are ignored.
99An argument of a lone `-' gets a description of possible arguments.
100.Pp
101If
102.Ar term
103has capabilities for direct cursor movement (see
104.Xr termcap 5 )
105.Nm
106``fixes'' the board after each move,
107so the board does not need to be reprinted,
108unless the screen suffers some horrendous malady.
109Also, any `p' option will be ignored.
110(The `t' option is not necessary unless the terminal type does not match
111the entry in the
112.Pa /usr/share/misc/termcap
113data base.)
114.Sh QUICK REFERENCE
115When the program prompts by typing only your color,
116type a space or carriage return to roll, or
117.Bl -tag -width indent
118.It Ic d
119to double
120.It Ic p
121to print the board
122.It Ic q
123to quit
124.It Ic s
125to save the game for later
126.El
127.Pp
128When the program prompts with 'Move:', type
129.Bl -tag -width indent
130.It Ic p
131to print the board
132.It Ic q
133to quit
134.It Ic s
135to save the game
136.El
137.Pp
138or a
139.Em move ,
140which is a sequence of
141.Bl -tag -width indent
142.It Ic s-f
143move from
144.Ic s
145to
146.Ic f
147.It Ic s/r
148move one man on
149.Ic s
150the roll
151.Ic r
152separated by commas or spaces and ending with a newline.
153Available abbreviations are
154.Bl -tag -width indent
155.It Ic s-f1-f2
156means
157.Ic s-f1,f1-f2
158.It Ic s/r1r2
159means
160.Ic s/r1,s/r2
161.El
162.El
163.Pp
164Use
165.Ic b
166for bar and
167.Ic h
168for home,
169or 0 or 25 as appropriate.
170.Sh AUTHOR
171.An Alan Char
172.Sh FILES
173.Bl -tag -width /usr/share/misc/termcap -compact
174.It Pa /usr/games/teachgammon
175rules and tutorial
176.It Pa /usr/share/misc/termcap
177terminal capabilities
178.El
179.Sh BUGS
180The program's strategy needs much work.
181