Long Distance Backgammon ------------------------ This is a program that lets two people easily play backgammon by e-mail. It currently runs only on character-oriented terminals (or emulators thereof) under the curses package. It runs on most flavors of UNIX, as well as VMS version 5.0 and above. To build ldb, create a directory, copy all the parts into that directory, strip the usenet or mail headers with a text editor, and execute them with a shell (e.g. sh Part1; sh Part2; ...). The installation options are documented in the Makefile. Suggestions and problems are cheerfully accepted, all the more so when accompanied by appropriate patches, in any format the patch program understands (e.g. context diff). E-mail to ross@emf780.den.mmc.com. New Features ------------ A complete listing of the changes for this revision is in the comments at the top of main.c. Briefly, they are: - Ldb has a context-sensitive help function that is activated whenever you press ? or h. - Match play is now supported. - The Crawford and Jacoby rules are supported, as is the european scoring of backgammons as double rather than triple games. - You can now declare a game to be "permanent", meaning that it will be automatically restarted when it ends. This is for people you play continuously. - The current pip count for you and your opponent is displayed above the board. - You can obtain detailed statistics about the rolls you and your opponent have received, including a histogram of relative frequency, by pressing the % or # keys. - You can press ESC while entering a message to get back to your game and abort the operation. - Ldb will not ask for the second digit of a 1-digit point number unless it needs to (e.g. to tell the difference between 1 and 12) - Comments are rot13'd before they are sent. That way you won't accidentally read the comment while extracting your mail and ruin the surprise. If ldb sees that your opponent is running an old version of ldb, comments work like they used to. - A lock file is used to prevent more than one ldb from running at the same time in any account. - The name, mail address, and an alias for all your opponents are stored in a new file. This file also keeps track of games won and lost to that opponent. - If you clobber your data file, ldb can reconstruct it from your opponents' data files. - Reverse video now works on VMS, as does the screen redraw and the supervisor key. - Any upper or lower case letters may be used to draw the pieces. - You can dump the screen to a file from the -control menu. Automatic Game Starters ----------------------- An automatic game starter has been set up on emf780.den.mmc.com. This matches people by ability and automatically starts a game between them. The ability categories are novice, intermediate, and expert. For example, if you consider yourself an expert, you would mail to: ldb-expert@emf780.den.mmc.com whereupon you will be matched at random with someone else who mailed to the same address, and your game will be started using the remotestart function of ldb. For more information, mail to: ldb-info@emf780.den.mmc.com You will receive an automated reply by return mail. Running Ldb ----------- The first time ldb is run, it will create a file in your home directory called ".ldbrc". If this name is inconvenient, define the environment variable LDBRC to be the name you want before running it the first time (and all times after that). Ldb will ask for your personal, human-type name and your e-mail address. All other options will be set to their defaults, as explained in the manual. The "sendcmd" option in .ldbrc may need to be modified to work with the mail program on your system. This option tells ldb how to send mail to your opponent, and must be correctly set for ldb to work. This string after "sendcmd=" is executed by ldb after making the following substitutions: $a is replaced by the address to mail to. $f is replaced by the file containing the message. $s is replaced by the subject line of the message. $$ is replaced by a single $. The default, which should work with most UNIX systems, is: mail -s '$s' $a < $f Note that ldb performs the substitutions, not the shell, so the substitutions are not subject to any quoting. All other characters, including shell metacharacters, are passed to the system unchanged. VMS users will have the following default sendcmd set: sendcmd=MAIL/SUBJECT="$s" $f IN%"""$a""" This is correct if you are using the IN% SMTP mailer. If not, you may need to change the sendcmd= line as follows: If you are using VMS mail only, use the line: sendcmd=MAIL/SUBJECT="$s" $f $a Depending on which SMTP mailer you have, the IN% may need to be changed to WINS% (for Wollongong), etc. To start a game, type: ldb -start opponent's-email-address and everything is automatic from there. You may have to exchange several mail messages before you are ready to play, since your ldb has to do the initial roll with the remote ldb, and if there is a tie, the initial roll is repeated. Eventually, you will see a board drawn on the screen. The commands are in the bottom right corner. The moves by you and your opponent are above that, on the right side of the screen, and the bottom of the screen contains a place for you to enclose a 2-line message with each move. This is useful for taunting, pleading, etc. You will need to press 'r' to roll the dice, then press the number of the roll you want to use followed by the point you want to move from. For example, if you roll 5 2, and you want to move the piece on the 11 point 5, press 5 1 1. You don't need to hit return. After you have used one of your rolls, there are 3 shortcuts you can use for the remainder of your roll: Continues the last move. The piece you last moved is moved by the amount of the other/next roll. Repeat the last move. The other/next roll is applied to the same point you moved from last time. p Make point. This gets a little tricky. Ldb attempts to use the other/next roll to move one of your pieces so that it ends up on the same point as your last move ended on. That is, if you roll 5 2 and use the 5 to move from the 6 point to the 11 point, and hit "p", ldb will move one of your pieces from the 9 point to the 11 point to make the 11 point. This assumes, of course, that you have a piece on the 9 point. Ldb checks your moves for all conceivable errors. These are listed in the manual. To move off the bar, merely select a roll. That roll will automatically bring you off the bar, since you have no other legal move anyway. To bear pieces off, you can either enter the point number like normal, or press "o" to have it bear off for you automatically. When a move arrives in your mail, go into mail and save the message into a file. Delete the message from your mail, exit mail, and run ldb with the name of the file as an argument. There are easier ways to feed incoming mail to ldb; these are discussed in the manual. For more options, read the manual and the comments at the top of main.c. Good luck! Perry R. Ross ross@emf780.den.mmc.com ----------------------------------------------------------------------------- Really Scary and Hopefully Bulletproof Legal Statement: This software is copyright 1991 by Perry R. Ross. Permission to use, copy, modify, and redistribute it is granted provided: (1) It is not sold. (2) This notice accompanies all copies, and is kept intact. (3) Users do not cheat by any method, including but not limited to: A. modifying the roll generated by the random number generator, B. modifying the code to provide any roll other than that generated by a bona-fide random number generator, C. taking advantage of any non-randomness in a random number generator to predict upcoming rolls, D. changing the contents of an incoming message or of the .ldbdata file to modify the normal progression of a game in any way, or E. generating a roll before offering to double. Persons guilty of cheating in any way while using this software are denied permission to use or distribute this software in perpetuity. Excluded from the definition of cheating is any action whose intention is to test or debug this software, as long as the opponent is aware that these actions are being performed, and the game is considered "unofficial". The above restrictions are made in all seriousness, and with every intention of enforcement by any and all legal means where practical. (Sounds almost as good as the real thing, doesn't it?)