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