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