home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume28 / ldb / part04 < prev    next >
Encoding:
Text File  |  1992-03-14  |  31.7 KB  |  806 lines

  1. Newsgroups: comp.sources.misc
  2. From: ROSS@emf780.den.mmc.com ("Perry R. Ross")
  3. Subject:  v28i096:  ldb - Play backgammon by e-mail, Part04/05
  4. Message-ID: <1992Mar13.035553.11882@sparky.imd.sterling.com>
  5. X-Md4-Signature: c5d99c7e611cf0b553629092ef802c0b
  6. Date: Fri, 13 Mar 1992 03:55:53 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: ROSS@emf780.den.mmc.com (Perry R. Ross)
  10. Posting-number: Volume 28, Issue 96
  11. Archive-name: ldb/part04
  12. Environment: UNIX, C, VMS, VAXC, CURSES, 32BIT
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then unpack
  16. # it by saving it into a file and typing "sh file".  To overwrite existing
  17. # files, type "sh file -c".  You can also feed this as standard input via
  18. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  19. # will see the following message at the end:
  20. #        "End of archive 4 (of 5)."
  21. # Contents:  ldb.man
  22. # Wrapped by ross@emf780 on Tue Mar 10 09:24:25 1992
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f 'ldb.man' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'ldb.man'\"
  26. else
  27. echo shar: Extracting \"'ldb.man'\" \(29974 characters\)
  28. sed "s/^X//" >'ldb.man' <<'END_OF_FILE'
  29. X.\" ldb.man        8/4/91
  30. X.\"
  31. X.\" Copyright 1991  Perry R. Ross
  32. X.\"
  33. X.\" Permission to use, copy, modify, and distribute this software and its
  34. X.\" documentation without fee is hereby granted, subject to the restrictions
  35. X.\" detailed in the README file, which is included here by reference.
  36. X.\" Any other use requires written permission from the author.  This software
  37. X.\" is distributed "as is" without any warranty, including any implied
  38. X.\" warranties of merchantability or fitness for a particular purpose.
  39. X.\" The author shall not be liable for any damages resulting from the
  40. X.\" use of this software.  By using this software, the user agrees
  41. X.\" to these terms.
  42. X.\"
  43. X.TH LDB 1 "September 25, 1991"
  44. X.nh
  45. X.nr si 5n
  46. X.ie \nT .pl \nTv
  47. X.UC 4
  48. X.SH NAME
  49. Xldb \- Play backgammon by e\-mail
  50. X.SH SYNOPSIS
  51. Xldb [options] [input files...]
  52. X.br
  53. X.SH DESCRIPTION
  54. X.I Ldb
  55. Xallows two people to play backgammon over a
  56. Xnetwork using electronic mail.  It runs on character\-oriented
  57. Xterminals, or emulators thereof, using the
  58. X.I curses
  59. Xscreen package.  It will run on most UNIX dialects, as
  60. Xwell as VAX\-C under VMS.
  61. X.I Ldb
  62. Xwill display a picture of the board, prompt the user to
  63. Xenter a move, check the move for legality,
  64. Xand send the move to the opponent.
  65. XWhen it arrives, it will be displayed on the opponent's screen,
  66. Xafter which the opponent will be prompted for a move to
  67. Xbe sent back.
  68. X.SH "IF YOU'RE IMPATIENT..."
  69. X.PP
  70. XIf you're one of those people that don't read manuals,
  71. Xthe README file has a quick overview, or you can
  72. Xskip ahead to the section entitled "STARTING A GAME".
  73. X.SH FEATURES
  74. X.IP "Multiple Games"
  75. X.I Ldb
  76. Xcan keep track of an arbitrary number of games simultaneously,
  77. Xand will display them one at a time for you to play.
  78. XYou can exit from
  79. X.I ldb
  80. Xat any time; when you run ldb again, it will pick up
  81. Xyour games where you left off.
  82. X.IP "Move Checking"
  83. XBoth your moves and your opponent's moves are checked for legality.
  84. XThis includes:
  85. X.IP \-
  86. XLanding on an occupied point.
  87. X.IP \-
  88. XBearing off before your inner table is full.
  89. X.IP \-
  90. XTrying to move pieces that are on the board when you
  91. Xhave a piece on the bar.
  92. X.IP \-
  93. XTrying to bear off a piece
  94. Xwhen there is a piece on a higher point, and
  95. Xthe roll is not being used exactly.
  96. X.IP \-
  97. XTrying to leave a usable move unused.
  98. X.IP \-
  99. XTrying to leave a move unused when it is usable and has
  100. Xa higher roll than the move that is used.
  101. X.IP \-
  102. XTrying to double when you doubled last.
  103. X.IP "Message Reliability"
  104. X.I Ldb
  105. Xdetects (and rejects) duplicate messages, and can
  106. Xregenerate lost messages.
  107. X.IP "Remote Start"
  108. X.I Ldb
  109. Xcan start a game between two players on remote hosts.
  110. XThis could be used to set up a "game starter" host,
  111. Xwhere people interested in finding new opponents could
  112. Xbe matched by some criteria (such as ability, or by a
  113. Xtournament schedule), and have their games started
  114. Xautomatically.
  115. X.IP "Game Value"
  116. X.I Ldb
  117. Xdetects the end of the game, gammons, and backgammons,
  118. Xand notifies both players of the game value when the
  119. Xgame is over.
  120. X.PP
  121. X.SH OPTIONS
  122. X.IP "\fB-read \fP"
  123. XMail is read, and the games are updated and saved.
  124. XThe user is not prompted for his moves.
  125. X.IP "\fB-play \fP"
  126. XAny games that are waiting for local input are
  127. Xdisplayed for the user to process.  No mail is read.
  128. X.IP "\fB-color xy\fP"
  129. XThe colors for any games started are set to x and y.
  130. XThe first color is played by the local user, and the
  131. Xother is played by the opponent.  Legal color
  132. Xcharacters are r(red), w(white), and b(black).
  133. XThe default is "\-color rw".  This argument is positional,
  134. Xand only affects games started after it has been scanned.
  135. X.IP "\fB-direction up/down\fP"
  136. XThe direction of play for any games started by the local user
  137. Xis set to the specified value.
  138. XThe default is "\-direction up".  This argument is positional,
  139. Xand only affects games started after it has been scanned.
  140. X.IP "\fB-myaddr addr\fP"
  141. XYour mail address is set to
  142. X.I addr
  143. Xfor games started after the
  144. X.I \-myaddr
  145. Xoption is scanned.  This overrides the address
  146. Xspecified in
  147. X.I .ldbrc.
  148. X.IP "\fB-start user\fP"
  149. XA game is started with the specified user.
  150. XThe
  151. X.I user
  152. Xargument may be any e\-mail address that is valid for
  153. Xyour host.  Some e\-mail addresses will need to be quoted
  154. Xif they contain shell metacharacters.
  155. X.IP "\fB-remotestart user1 user2\fP"
  156. XA game is started between user1 and user2.  The local
  157. Xhost sends a remote start message to user1 instructing
  158. Xit to start a game with user2.  The local host
  159. Xdoes not participate thereafter in the game.
  160. XFor the purposes of the \-color and \-direction options,
  161. Xuser1 is considered the local user.
  162. X.IP "\fB-broadcast file\fP"
  163. XThe specified file is mailed to all current opponents.
  164. XThis is useful for announcing vacation absences, etc.
  165. X.PP
  166. XThe default mode for the \-read and \-play options
  167. Xis to do both.  This is also what happens if both
  168. X\-read and \-play are given.  Any arguments not beginning
  169. Xwith \- are treated as input files and are searched for
  170. Xincoming moves from opponents.  It is not an error for
  171. Xany of these files to not exist.
  172. X.PP
  173. X.SH SCREEN
  174. XThe screen is divided into seven basic sections.  These are:
  175. X.IP \fBOpponent\fP
  176. XThe e\-mail address and personal name of the opponent are displayed
  177. Xon the top line of the screen.  This can help identify the
  178. Xgame if you have many games in progress at once.
  179. X.IP "\fBBoard Label\fP"
  180. X.I Ldb
  181. Xdisplays one of three possible board images at a time;
  182. Xthe name of the board currently displayed is shown on
  183. Xthe second line of the screen.
  184. XThe significance of these three boards is explained below.
  185. X.IP "\fBBoard\fP"
  186. XThe board is displayed near the left side of the screen, and takes
  187. Xup most of the screen area.  It consists of an outline, drawn
  188. Xwith ASCII characters, and 28 "points" where pieces can reside.
  189. XOf these, 24 are the normal points making up the main body of the
  190. Xboard (numbered 1\-24),
  191. X2 are the "BAR" points, located between the left
  192. Xand right halves of the main board, and 2 are the "OFF"
  193. Xpoints (where pieces go when they are borne off), located to the
  194. Xleft of the board.  Pieces are represented by lower case letters,
  195. Xtaken from the set [bwr], and represent the colors black, white,
  196. Xand red, respectively.  To help you remember which direction you
  197. Xare playing, there are arrows drawn at the four corners of the
  198. Xboard indicating your direction of play.
  199. X.IP "\fBDoubling Cube\fP"
  200. XThe current value of the doubling cube is displayed in reverse
  201. Xvideo on the left side of the screen.  The cube will appear
  202. Xon the side of the board where the home board of the owner
  203. Xof the cube is located, or in the middle if neither player
  204. Xhas doubled.  For example, if the player whose home board is
  205. Xat the bottom of the screen doubled last, the cube will appear
  206. Xbeside the top of the board.
  207. X.IP "\fBMove Blocks\fP
  208. XThe move blocks are located on the right of the screen.  There
  209. Xare two move blocks; one for you, and one for your opponent.
  210. XYou will use your move block to enter your moves, and you will
  211. Xsee your opponent's moves displayed in his move block.  A move
  212. Xblock consists of a header, which identifies the owner of the
  213. Xmove block, and two columns of either two or four lines.
  214. XEach line in a move block is one roll, and shows the value
  215. Xof the roll (in the range 1\-6) and how that roll has been used.
  216. XIf doubles were rolled,
  217. Xthe third and fourth lines will also
  218. Xbe used to display the two additional rolls that may be used.
  219. X.IP "\fBCommand Box\fP"
  220. XThe bottom right corner of the screen contains a small box
  221. Xthat displays the commands that are legal at any given time.
  222. XYou can execute a command by typing the first letter; you
  223. Xshould not hit return afterwards.  There may be legal commands
  224. Xother than those shown in the command box, depending on
  225. Xthe state the game is in.
  226. X.IP "\fBMessage Area\fP"
  227. XThe bottom 6 lines of the screen are reserved for messages of
  228. Xvarious types.  The bottom line is used for error and informative
  229. Xmessages that occur as a game is played.  The top line in this
  230. Xarea displays messages pertaining to the status of a game, such as
  231. Xblots hit by an opponent's move.  The remaining 4 lines are used to
  232. Xenclose a message to your opponent with your move, and to display
  233. Xthe one your opponent sent to you.  These messages may be up to
  234. X2 lines of 56 characters.
  235. X.PP
  236. X.SH "STARTUP FILE"
  237. XThe first time you run
  238. X.I ldb,
  239. Xit will ask you if you want to
  240. Xcreate a
  241. X.I .ldbrc
  242. Xfile.  You should answer "yes", unless you have a reason
  243. Xnot to.  If you want the ldb startup file to be named something
  244. Xother than
  245. X.I .ldbrc,
  246. Xyou should set the environment variable LDBRC to the
  247. Xname you want before
  248. Xrunning ldb for the first time.
  249. XIf you do this, the LDBRC variable must be set
  250. Xevery time you run ldb.
  251. X.I Ldb
  252. Xmoves to the directory in the HOME environment variable,
  253. Xif it is set, before accessing any files.
  254. XThis makes all files (including .ldbrc) relative
  255. Xto $HOME.
  256. X.PP
  257. XThe
  258. X.I .ldbrc
  259. Xis organized as a sequence of name/value pairs, one per line,
  260. Xin the format
  261. X.I "name=value".
  262. XThere should be no spaces before
  263. X.I name
  264. Xor before or after the equals sign.  Comments are not allowed.
  265. XThe following names are defined:
  266. X.IP myname
  267. XThis line is where you enter your (human) name.
  268. XIt is sent to your opponent when a game is started, to
  269. Xmake things a little more personal.  You can put anything
  270. Xyou like here, of course, but I highly recommend you just
  271. Xstick to your name; the novelty wears off cute stuff
  272. Xpretty fast.  Also, remember that upper\-case\-only terminals
  273. Xwent out of style somewhere around the same time as
  274. XPresident Carter, and I think we're probably better off
  275. Xwithout both.  Enter your name with only the first letter
  276. Xof each word capitalized, and avoid shouting at your opponents.
  277. XThis line is mandatory; if you don't want your name
  278. Xsent to people, you can just put an empty string after the equals,
  279. Xbut you must have something.
  280. X.IP myaddr
  281. XThis line defines your e\-mail address.  This is sent to your
  282. Xopponent when you start a game so they know how to send
  283. Xmail back to you.  For people with multiple mail paths, put
  284. Xthe one here you use the most (e.g. the Internet domain\-style
  285. Xpath), and for games that need to use a different address,
  286. Xuse the
  287. X.I \-myaddr
  288. Xcommand line argument to override the path in
  289. X.I .ldbrc.
  290. XThe
  291. X.I myaddr
  292. Xline is mandatory.
  293. X.IP gamefile
  294. XThis line sets the file name that is used to store games
  295. Xin progress.  It is optional, and if it is not given, the
  296. Xgame file defaults to
  297. X.I .ldbdata.
  298. XMy advice, if you care, is that you should avoid
  299. Xusing a file name containing the string
  300. X.I games
  301. Xor any other giveaway string that would let your boss, sysadmin,
  302. Xor other local Nazi\-type know that you're using
  303. Xa multi\-million dollar piece of high\-tech equipment to goof off,
  304. Xwhen you could do that with nothing more exotic than
  305. Xa rubber band and some spitballs.
  306. X.IP backupfile
  307. XThis is the file your old
  308. X.I gamefile
  309. Xwill be moved to just before a new
  310. Xone is created.  It defaults to
  311. X.I ".oldldbdata."
  312. X.IP mailfile
  313. XWell, you've got a couple of options here.  One is to just put
  314. Xsome file name here (the default is ldb.rcv) and, when you receive
  315. Xmail containing an
  316. X.I ldb
  317. Xmove, just save it to this file.  When you are done reading your mail,
  318. Xrun ldb, and it will scan this file and extract all your incoming
  319. Xmoves, just like magic.  If your mail program is like most, it will
  320. Xappend messages if the file you are saving to already exists,
  321. Xwhich is just what you want.
  322. X.I Ldb
  323. Xwill silently ignore moves that it has already seen for games in
  324. Xprogress, so you don't have to clean them out of your mailfile
  325. Xif you don't want to.
  326. X.I BUT,
  327. Xyou DO need to clean START messages out sometime before the
  328. Xgame they started ends; once the game is
  329. Xover and is deleted from the gamefile, ldb will think the START
  330. Xmessage is a new one and
  331. Xstart a spurious game.  So the best course is to delete all messages
  332. Xafter ldb has read them.
  333. X.IP ""
  334. XFor those fortunate enough to be on real UNIX,
  335. Xyour second option is to set the mailfile to point to your
  336. Xactual mail file (e.g. /usr/spool/mail/username), and let ldb
  337. Xscan your mail directly.  This will only work if your system
  338. Xkeeps mail in ASCII format, but many do.  Ldb will not
  339. Xdelete these messages from your mail
  340. Xso you will have to.  The same note applies here as in the
  341. Xfirst option regarding START messages; odd things will happen
  342. Xif you let a START
  343. Xmessage sit in your mail after the game
  344. Xit started ends.
  345. X.IP ""
  346. XVMS users should read the section entitled "VMS NOTES"
  347. Xfor more information on extracting mail.
  348. X.IP sendcmd
  349. XThis tells ldb how to send a file with your particular
  350. Xmail command.  This string is passed to the system, after making the
  351. Xfollowing substitutions:
  352. X.IP "     $a" 10n
  353. Xis substituted with the address to mail to.
  354. X.IP "     $f" 10n
  355. Xis substituted with the file containing the message.
  356. X.IP "     $s" 10n
  357. Xis substituted with the subject of the message.
  358. X.IP "" 5n
  359. XMost mail systems will work fine with the default, which is
  360. X.nf
  361. X     mail \-s '$s' $a < $f
  362. X.fi
  363. XNote that the $ substitutions are
  364. Xmade by ldb, not by a shell, and thus are not subject to
  365. Xany quoting.  If you need a $ in the string, use $$.
  366. XVMS users should use the string
  367. X.nf
  368. X     MAIL/SUBJECT="$s" $f $a
  369. X.fi
  370. Xto send VMS mail (if both you and your opponent are using VMS mail),
  371. Xotherwise you may need to include a mailer string in your command;
  372. Xfor example, to send UNIX mail using Wollongong TCP/IP, you would
  373. Xuse the string
  374. X.nf
  375. X     MAIL/SUBJECT="$s" $f WINS%"""<$a>"""
  376. X.fi
  377. Xand yes, that really is three quote marks after "WINS%".
  378. X.IP tempfile
  379. XThis line specifies a temporary file that ldb can use to compose
  380. Xmail messages.  The file will be created in your home directory,
  381. Xthus avoiding file name conflicts in /tmp.  It defaults to ldb.tmp.
  382. X.IP colors
  383. XThis is a two\-character string from the set [rwb] (red, white, and
  384. Xblack, respectively), and defines
  385. Xyour preferred colors for any games you start.  The first character
  386. Xin the string is the color you will play, and the second is the
  387. Xone your opponent will play.  It defaults to "rw", and is
  388. Xoverridden by the
  389. X.I \-color
  390. Xcommand line argument.
  391. X.IP direction
  392. XThis is either "up" or "down", and defines your preferred direction
  393. Xof play for games you start.  The direction of play only refers to
  394. Xwhether you play toward increasing or decreasing numbered points.
  395. XAlthough by default upward play goes toward the top of the screen,
  396. Xthis can be reversed (for your screen only) by the "Invert"
  397. Xcommand in the Control menu,
  398. Xaccessible via the
  399. X.I \-control
  400. Xcommand line argument.  The default for this line is "up",
  401. Xand is overridden by the
  402. X.I \-direction
  403. Xcommand line argument.
  404. X.IP initialboard
  405. XAs was alluded to earlier, your screen shows one of
  406. Xthree possible board images at any time.  Although
  407. Xthe purpose for this
  408. Xwill be explained later, this line allows you to select
  409. Xwhich of these three boards should be displayed initially.
  410. XThe legal values are "before", "after", and "current".
  411. XThe default is "current".
  412. X.IP autoroll
  413. XIf you were the last to double, you have no option
  414. Xbut to roll the dice when it is your turn.  If
  415. Xautoroll is enabled, ldb will roll the dice for you automatically
  416. Xin this case.  For those that prefer consistency, autoroll
  417. Xmay be disabled, although attempting to double when you
  418. Xdoubled last will provoke a nasty (and well\-deserved)
  419. Xerror message.  Possible values for autoroll are "yes" and "no",
  420. Xwith "yes" being the default.
  421. X.IP automove
  422. XEach time you roll the dice, ldb determines how many
  423. Xlegal ways there are for you to use your rolls.  In the
  424. Xrelatively unusual case where there is only one way
  425. Xfor you to use your rolls, ldb can automatically apply
  426. Xthis move to your board before displaying it.  Automove
  427. Xis disabled by default because it's really
  428. Xpretty annoying.  Possible values for automove are "yes"
  429. Xand "no", with "no" being the default.
  430. X.IP autodouble
  431. XOne of the official rules of backgammon allows for
  432. Xautomatically doubling the game value when the opening
  433. Xroll is a tie.  The rules go on to state that automatic
  434. Xdoubling is only to be used when the players agree beforehand
  435. Xon its use and limitations.  The method ldb uses to implement
  436. Xthis somewhat vague rule is to allow each player to specify
  437. Xa maximum number of autodoubles they are willing to accept in
  438. X.I .ldbrc,
  439. Xand for the maximum number of autodoubles applied to any game
  440. Xto be the lesser of the two players' specified limits.
  441. XFor example, if you set
  442. X.I "autodouble=4"
  443. Xin your .ldbrc, no game you play will ever be autodoubled
  444. Xmore than 4 times, although the number of tied opening rolls
  445. Xis obviously not limited.  However, if you were to start a game
  446. Xwith someone who had set
  447. X.I "autodouble=2",
  448. Xthat game would be limited to at most 2 autodoubles.  If you don't
  449. Xwant to play automatic doubles, set
  450. Xautodouble=0, which is also the default.
  451. X.IP superkey
  452. XSome people don't have bosses.  Some people have private desks.
  453. XSome people play from home.  Some people liked it so much,
  454. Xthey bought the company.  If you're not one of them,
  455. Xyou may want to enable the superkey function.
  456. XJust pick a key on the keyboard you never use in ldb, such as the
  457. Xbackquote, and put a line in
  458. X.I ".ldbrc"
  459. Xsetting superkey to the
  460. X.I "decimal ASCII code"
  461. Xof the key you want; for example, to use the backquote key,
  462. Xuse "superkey=96".
  463. XOnly single\-character keys are allowed, and
  464. Xthe key you select will not be usable for normal purposes
  465. Xwithin ldb.  Make it one you can hit in a hurry.
  466. X.IP supercmd
  467. XIf you'd rather have a program of your choice come up
  468. Xinstead of the shell when the superkey is pressed,
  469. Xput it on this line.  It will be passed
  470. Xunchanged to a shell via the system() function.
  471. X.PP
  472. X.SH "STARTING A GAME"
  473. XBefore you will be able to use the most important features
  474. Xof ldb, such as actually playing backgammon, you will need
  475. Xto start a game.  This is done by using the
  476. X.I \-start
  477. Xcommand line argument, along with the e\-mail address of
  478. Xthe person you wish to play with.
  479. XFor example,
  480. X.nf
  481. X     ldb \-start mybuddy@back.gammon.com
  482. X.fi
  483. XIf you want to play white, and make your opponent play
  484. Xblack, use the command
  485. X.nf
  486. X     ldb \-color wb \-start black@blah.blah.blah
  487. X.fi
  488. XSee the
  489. XOPTIONS section for more details on the available
  490. Xcommand line arguments.
  491. XUnfortunately,
  492. X.I ldb
  493. Xwill not allow you to play with yourself, but
  494. Xthat's ok because you'd probably lose.
  495. X.PP
  496. XWhen you start a game, a unique
  497. X.I gameid,
  498. Xor game identifier, is created using your e\-mail address
  499. Xand the current time.  This gameid is sent to your opponent,
  500. Xalong with your e\-mail address (so he can send back to you),
  501. Xand your opening roll.  When your opponent receives
  502. Xyour message, his ldb will roll his opening roll, and
  503. Xdecide who won.  If you won, his ldb will send back
  504. Xa message telling you to use the opening roll.  If he
  505. Xwon, he will use the opening roll and his ldb will send
  506. Xa message to that effect.  Either way, the game is off
  507. Xand running.
  508. X.PP
  509. XIf, by unfortunate chance, the opening roll is a tie,
  510. Xyour opponent's ldb will send
  511. Xyour ldb a message to that effect.
  512. XThis will cause a new opening roll, but hopefully
  513. Xnot another tie.  A message will be printed telling you
  514. Xwhat's going on;
  515. Xjust keep feeding the incoming messages to ldb, and
  516. Xit will take care of everything.
  517. X.PP
  518. X.SH "PLAYING A GAME"
  519. XWhen you start a game, you roll a die and send that
  520. Xroll to your opponent, who also rolls a die and
  521. Xcompares them.
  522. XIf you won, you will use the opening roll as your
  523. Xfirst move, so skip on down to the next paragraph.
  524. XOtherwise, he will have used those rolls,
  525. Xand they will be displayed in his move block.
  526. XYou will now find yourself
  527. Xfaced with five options: Roll, Double, Concede, and Next Game.
  528. XUnless you are very cocky, I would not suggest doubling
  529. Xat this point.  You could always concede, but I really
  530. Xthink that would be selling yourself short.  If you choose
  531. X.I "Next Game,"
  532. Xldb will save the current state of your game and go on
  533. Xto the next one, but eventually you will re\-run ldb,
  534. Xat which point you will be faced with this same choice,
  535. Xand let's face it, you can't run from it forever.
  536. XSo we're agreed, you should choose "Roll".
  537. XJust press "r", and watch your roll appear on
  538. Xyour move block (along the right side of the screen, under the
  539. Xword "You").  You should see two numbers appear (four if you
  540. Xrolled doubles), and the word UNUSED beside them.
  541. X.PP
  542. X(If you won the opening roll, you should join us here.)
  543. XDecide which of the rolls you want to use first, and press
  544. Xthe number of that roll.  For example, say you rolled
  545. X1 6 (good roll!), and you want to move the obvious 8\-7, 13\-7 to
  546. Xmake your bar point.
  547. XJust hit "6".  Notice the cursor jump up to your move block, beside
  548. Xthe "6" roll?  It is waiting for you to enter the point you want
  549. Xto move from.  Press "1" "3" (don't hit return).  You should see
  550. Xa piece move from 13 to 7, and this fact will be reflected in
  551. Xyour move block as well.  Now, press "1".  Again the cursor
  552. Xjumps to the move block, and you type "8", followed by some
  553. Xnon\-numeric character such as the space bar (since ldb expects 
  554. Xtwo characters for a point).  The second entry in the move block
  555. Xreflects this move, as does the board.  Happy?  If not, press
  556. X"r"; this will reset your rolls to UNUSED and put
  557. Xthe board back to how it was before you moved,
  558. Xand then you can enter some different moves.  Otherwise, hit "s"
  559. X(not "q"!)
  560. Xto send the move.  The cursor will jump down to the message area,
  561. Xwhere you get a chance to enclose a message to your opponent,
  562. Xperhaps to gloat over the great move you just made.
  563. XYou only get 2 lines of 56 characters, so keep it short.  When
  564. Xyou are done, press <escape>.  Your move is on its way!
  565. X.PP
  566. XThere are three shortcuts you can use
  567. Xafter you have entered your first move:
  568. X.IP 1.
  569. XYou can press <return>, which will "repeat" your last move.
  570. XThat is, your next remaining roll will move from the same
  571. Xpoint as your last one moved from.  This is handy when
  572. Xusing doubles to move more than one piece from the same point.
  573. X.IP 2.
  574. XYou can press <space>, which will "continue" your last move.
  575. XThat is, your next remaining roll will move from the
  576. Xpoint your last move ended on.
  577. X.IP 3.
  578. XYou can press "p", which will attempt to make the point your
  579. Xlast move ended on.  In our 1 6 example above, you could have
  580. Xjust hit "p" after you moved 13\-7, and ldb would have figured
  581. Xout that to make the 7 point with the remaining roll of 1,
  582. Xit would have to move a piece from the 8 point.
  583. X.PP
  584. XIn addition, there is one more shortcut that may be used
  585. Xwith any roll.  If you want to use a roll to bear off
  586. Xa piece, you can just hit "o".  Ldb will locate the
  587. Xpoint (if any) from which pieces may be legally borne off
  588. Xby the next unused roll, and make that move automatically.
  589. XYou can also select a roll, then hit "o".
  590. X.PP
  591. X.SH DOUBLING
  592. XIf you decide to double, just choose "Double" instead of
  593. X"Roll".  You will get to enclose a message, just like when
  594. Xyou send a move, then your message gets sent.  Once you have
  595. Xdoubled, you cannot double again until your opponent does so,
  596. Xso ldb automatically selects "Roll" and sends you to the
  597. Xnext menu.  If you don't like this, you can disable it by
  598. Xsetting
  599. X.I autoroll=no
  600. Xin .ldbrc.
  601. X.PP
  602. XIf your opponent doubles, you will see a message just under
  603. Xthe board to that effect, and a menu will come up
  604. Xallowing you to Accept or Decline the double.
  605. XDeclining the double means you lose the game for the
  606. Xcurrent game value.  Accepting means that the game
  607. Xcontinues, but its value is doubled.  The current
  608. Xgame value is shown to the left of the board.  After
  609. Xyou accept, you should see this display move next to your
  610. Xhome board, indicating that you own the doubling cube.
  611. X.PP
  612. X.SH BOARDS
  613. X.I Ldb
  614. Xmaintains three board images at all times.  These are:
  615. X.IP 1
  616. XThe board before your opponent's last move.  This is,
  617. Xof course, the same as the board after your last move.
  618. XIt is for display purposes only, so you can see your
  619. Xopponent's move "before and after".  The pieces your opponent
  620. Xis going to move are highlighted.
  621. X.IP 2
  622. XThe board after your opponent's last move.
  623. XThis is the same as the board before your current move,
  624. Xand it is the one the Reset command uses to erase your moves
  625. Xif you don't like them.  It also shows the condition of the
  626. Xboard after your opponent's last move, with the pieces he
  627. Xmoved highlighted.
  628. X.IP 3
  629. XThe current board.  This is the same as board #2, except any moves
  630. Xyou have made are also reflected here.  Nothing is highlighted.
  631. X.PP
  632. XBy default, ldb displays the Current board at all times.  If
  633. Xyou want to see the other boards, use the Board command
  634. X(provided it is in the current menu).  This will cycle through
  635. Xthe three boards in the order they are listed above.  The second
  636. Xline of the screen tells you which board is displayed.  When
  637. Xyou roll, ldb automatically switches to the Current board if
  638. Xit is not already up.  You can set which of these three boards
  639. Xis initially displayed via the
  640. X.I initialboard
  641. Xsetting in .ldbrc.
  642. X.PP
  643. X.SH "CONTROLLING A GAME"
  644. XThe
  645. X.I \-control
  646. Xoption permits you to control your games in
  647. Xcertain ways.  Each of your current games are
  648. Xdisplayed, one at a time, just as they are when you
  649. Xare playing, allowing you to perform any of the
  650. Xfunctions on the control menu.
  651. XThe control menu has the following commands:
  652. X.IP "Invert"
  653. XThis allows you to invert the board for this game.  The
  654. Xboard will invert immediately on your screen, so you can
  655. Xsee if you like it.  Pressing
  656. X.I Invert
  657. Xagain will put it back to normal.  Inverting the board does
  658. Xnot affect the point numbering or the color you play,
  659. Xit merely draws the board with the low-numbered points at
  660. Xthe top of the screen rather than the bottom.  You may find
  661. Xit easier to make all of your games play a certain direction.
  662. X.IP "Resend"
  663. XFrom time to time, messages may be lost due to faulty mailers
  664. Xor human error.  If your last message gets lost, you can
  665. Xregenerate it with the
  666. X.I Resend
  667. Xcommand.  There is no harm in regenerating messages, as
  668. Xldb will ignore duplicate messages.  If you and your opponent
  669. Xhave forgotten whose move it is, the easiest way to get going
  670. Xagain is for both of you to resend your last message.  The one
  671. Xthat got lost will be accepted, and the game will be off
  672. Xand running again.
  673. X.IP "Delete Game"
  674. XThis command marks a game for deletion.  The game is not deleted
  675. Xuntil you quit, and you can undelete it by pressing D again.
  676. XNormally, you should not delete a game in this manner, 
  677. Xyou should play until someone wins or concedes.  The
  678. X.I "Delete Game"
  679. Xcommand can be used to get rid of games where your opponent
  680. Xdoesn't answer his mail, or doesn't want to play, etc.
  681. X.IP "Next Game"
  682. XThe next game is displayed.  If there is no next game,
  683. Xthis choice is equivalent to
  684. X.I Quit.
  685. X.IP "Quit"
  686. XThis allows you to exit from
  687. X.I "\-control".
  688. XIf you made any changes to your games, you will be given the opportunity
  689. Xto save these changes, then ldb will exit.
  690. X.SH "VMS NOTES"
  691. X.PP
  692. XVMS users will have a few problems that UNIX users won't
  693. X(I mean in addition to having to use VMS).
  694. XVMS mail doesn't append
  695. Xmessages to an existing file, it creates new versions.
  696. XLdb will ignore all but the most recent version,
  697. Xcausing it to miss moves.  There may be some obscure mail option flag
  698. Xto make it append to a file instead,
  699. Xbut I cannot find it because quite frankly I'm too lazy to look.
  700. XThe easiest way around this is to save each message to a different
  701. Xfile, then give all those file names as arguments to ldb.
  702. XIf you'd rather save them to the same file, you can make ldb read
  703. Xall the versions by putting them on the command line, as in:
  704. X.nf
  705. X     $ ldb ldb.in;1 ldb.in;2 ldb.in;3 ...
  706. X.fi
  707. Xbut you should remember not to execute a "PURGE" before
  708. Xrunning ldb.
  709. X.PP
  710. XIf you have the Eunice package, ldb will compile and run under it just dandy,
  711. Xbut any files created by the Eunice\-compiled version
  712. X(most notably the games file)
  713. Xwill be incompatible with the VAX C\-compiled version.  Use the
  714. Xunixtovms command to convert.
  715. X.PP
  716. XAs ldb is distributed in "shar" format, you will need some
  717. Xkind of shell to extract it, or if you're really
  718. Xdesperate you could do it by hand with an editor.
  719. XOnce you manage to extract it, you can just type:
  720. X.nf
  721. X     $ @makeldb
  722. X.fi
  723. Xto compile and link it.  After that, you'll probably want
  724. Xto define a symbol such as:
  725. X.nf
  726. X     $ ldb :== $dua0:[me.ldb]ldb
  727. X.fi
  728. Xso you can run it.
  729. X.PP
  730. XFor some reason, the screen redraw (control\-L) does
  731. Xnot work on the VAX\-C curses.  You may want to
  732. X.nf
  733. X     $ SET TERM/NOBROADCAST
  734. X.fi
  735. Xbefore running ldb, so that your screen doesn't get messed up.
  736. XAlternatively, you can fix your screen by just quitting
  737. Xand re\-running ldb (except while you're entering a message).
  738. X.SH BUGS
  739. X.PP
  740. XA game file created by ldb under Eunice must be run through
  741. X"unixtovms" before the VAX\-C ldb can read it.
  742. X.PP
  743. XThe "Concede" command violates the rules, in that it allows one
  744. Xplayer to unilaterally settle the game for the current game value.
  745. XThis could be used to avoid an impending gammon.
  746. X.PP
  747. XAn apparent deficiency in VAX\-C curses makes the ^L redraw feature
  748. Xinoperable, and causes the screen contents to be lost
  749. Xafter using the supervisor key.
  750. X.PP
  751. XLdb should be distributed in vms_shar format too, and the
  752. Xmanual should be distributed in runoff format.  Until then,
  753. XVMS users are on their own as far as unpacking the code and formatting
  754. Xthe manual are concerned.  Sorry.
  755. X.PP
  756. XVAX\-C substitutes
  757. Xbold for reverse video, which
  758. Xprevents the cube from looking like a cube.
  759. X.PP
  760. XThe messages ldb prints regarding ties, new games, etc. are lost
  761. Xwhen the first game is displayed.  There should also be
  762. Xmessages for other cases, such as when games are started,
  763. Xwhen ldb is invoked and there are no games
  764. Xwaiting for local input, and when no activity has occurred on
  765. Xa game for a week or so.
  766. X.PP
  767. XThe superkey function only works when ldb is waiting for a key.
  768. XIf ldb is doing something time-consuming, such as calculating
  769. Xlegal moves, the superkey will not work until the calculation
  770. Xis complete.
  771. X.PP
  772. XLdb should log wins and losses by opponent, and should support
  773. Xplaying up to a point total, rather than just a single game.
  774. X.PP
  775. XLdb could do all kinds of helpful things, such as calculate
  776. Xa pip count on the fly.
  777. X.PP
  778. XThere should be a way to play interactively (using socket connections,
  779. Xfor example), rather than via e\-mail.
  780. END_OF_FILE
  781. if test 29974 -ne `wc -c <'ldb.man'`; then
  782.     echo shar: \"'ldb.man'\" unpacked with wrong size!
  783. fi
  784. # end of 'ldb.man'
  785. fi
  786. echo shar: End of archive 4 \(of 5\).
  787. cp /dev/null ark4isdone
  788. MISSING=""
  789. for I in 1 2 3 4 5 ; do
  790.     if test ! -f ark${I}isdone ; then
  791.     MISSING="${MISSING} ${I}"
  792.     fi
  793. done
  794. if test "${MISSING}" = "" ; then
  795.     echo You have unpacked all 5 archives.
  796.     rm -f ark[1-9]isdone
  797. else
  798.     echo You still need to unpack the following archives:
  799.     echo "        " ${MISSING}
  800. fi
  801. ##  End of shell archive.
  802. exit 0
  803.  
  804.  
  805. exit 0 # Just in case...
  806.