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