xgammon — an X11 backgammon for linux

Synopsis

xgammon [-otherdisplay <displayname>]
        [-boardgeometry <geometry_string>]

        [-boardcolor <color>] [-bc <color>]

        [-darkcolor <color>] [-dc <color>]

        [-lightcolor <color>] [-lc <color>]

        [-barcolor <color>] [-b <color>]

        [-whitecolor <color>] [-blackcolor <color>]

        [-doublerfont <font>] [-smallFont <font>]

        [-doubling +doubling]

        [-watchmove +wachmove]

        [-stonesteps <pixel>]

        [-delaytime <tsec>]

        [-buttonmove +buttonmove]

        [-bm +bm]

        [-autoplay +autoplay]

        [-rollout +rollout]

        [-nr <number_of_rollouts>]

        [-f <filename>]

        [-h (black|white)]

        [-gamekind -g (hvc|cvc|hvh)]

        [-winat <points>]

        [-? -help]

Description

`xgammon', a backgammon program for linux

Options

xgammon recognizes the following options:
-otherdisplay <displayname>
Play a game with a player on some remote X-Terminal. A second `xgammon' will be displayed there. (example: xgammon -otherdisplay somehost:0.0)
-boardgeometry <geometry_string>
Defines the size of the board widget. `Geometry_string' must be an XtGeometry-string (example: 450x350). By default the relation of width/height of the board is 12/15. <Geometry_string> is rounded to this relation.
-boardcolor, -bc <color>
Sets the background color of the board.
-darkcolor, -dc <color>
Sets the color of dark points.
-lightcolor, -lc <color>
Sets the color of light points.
-barcolor, -b <color>
Sets the color of the bar and the left and right edge of the board.
-whitecolor, -blackcolor <color>
Sets the color of the stones.
-humancolor, -h (black|white)
Sets the color of the human player's stones. Implies a game between `xgammon' and a human being. (The default).
-doublerfont <font>, -smallFont <font>
These are the fonts used for the doubler dice. Only one large and one small font can be selected now, not a font family yet.
-gamekind, -g (cvc|hvc|hvh)
Sets the game.
cvc means computer versus computer,
hvc means human versus computer,
hvh means human versus human,
-winat <points>
Play a tournament up to <points> points.
-watchmove, +watchmove
`xgammon' will "move" it's stones.
-stonesteps <pixel>
You can speed up the stones by giving this resource a greater value. Implies watchmove is set `true'.
-delaytime (tseconds)
Sets a delaytime in tenth of a second, which gives you a closer look on the computer moves. Implies watchmove is set `false'.
-buttonmove -mb, +buttonmove +bm
If buttonmove is true, you can set the stones simply by pressing the button. The left button sets the lower dice value, the right one the other. In case of equation both buttons can be used.
-autoplay, +autoplay
`Xgammon' will set your stones, if there is only one possible move.
-doubling, +doubling
Sets the use of the doubler dice. Since the doubling of `xgammon' is still poor, you might wish to turn it off.
-rollout, +rollout
`Xgammon' will rollout a position. This rank is read from a file. (See -f option below.) This file is automatically generated from the current game, if not specified otherwise.
-nr <number_of_rollouts>
Sets the number of rollouts.
-f <filename>
Specifies the positionfile you want to use. The default is `xgammon.save'.
-database <filename>
Specifies the endgame database file to use.

How to play

When you start the game, `xgammon' will immediately roll and start a game. When it's your turn:
Move pointer to a stone.
Press left button.
Carry stone to the chosen point.
Release button.
That's it.
To speed this a little up, try the +buttonmove option or .buttonmove resource. (See RESOURCES or OPTIONS.)

Doubling

When you're allowed to double, `xgammon' draws empty dice. You can double by a single click on the doubler dice or press the `d' key.
Some simple popups manage the rest.
This is only possible, when the `doubling' resource is `true'. (See RESOURCES or OPTIONS.)

Game options

There are three different kind of games. Human versus human, computer versus human, and computer versus computer. The last one isn't very meaningful yet, and more or less for reasons of development.

Keys

The board reacts on the following keys:
`q', `<Ctrl>c' or `<Ctrl>d' quit the game.
`u' undoes the current move move.
`r' restarts the game (tournament).
`s', `S', `l' and `L' save or load a position or game.
You may set these keys in your .Xdefaults file.

Text windows

There are two text windows in the `XGammon-Buttons' window, where the current tournament, moves, doubler actions etc. are printed. You can also add comments there. The text in the lower window will be saved if you invoke any save command.

Edit a position

You may edit a position, and play out from there, by pressing the `edit position' menu entry in the `game' menu. Black stones are set with left mouse button, white stones with the right one. If you misplace a stone you can remove it with the middle button. There will be a popup asking for additional information, if you have entered 15 black and 15 white stones, or pressed any key to stop placing stones.

Mail dump a position

Clicking the menu entry `mail dump' `xgammon' will save the current position in a file named `xgammon.maildump'. The occuring format is that used most often in `rec.games.backgammon' news group. So it should be very easy to edit a position, add some comments and then mail or post it.

Rollouts

Even if there is the menu option `rollout', this is more or less a command line option. An example would be
`xgammon -rollout -nr 1000 -doubling -f rollout.save',
which would rollout a 1000 times the position saved in `rollout.save'. It should be rather easy to modify the save file slightly, and make several rollouts of these positions. All results will be appended to these files. If you use the menu entry `rollout', it is most important to set an appropriate `numrollouts' resource in your `.Xdefault' file, because `xgammon' will not ask you for this value, when starting rollouts.

X resources

.otherdisplay: <displayname>
Play a game with a player on some remote X-Terminal. A second `xgammon' will be displayed there. (example: xgammon -otherdisplay somehost:0.0)
.boardColor: <color>
Specifies the background color of the board.
.lightColor: <color>
Specifies the background color of the lighter points.
.darkColor: <color>
Specifies the background color of the darker points.
.barColor: <color>
Specifies the color of the bar and the board borders.
.whiteColor: <color>
Specifies the color of the "white" stones.
.blackColor: <color>
Specifies the color of the "black" stones.
.doublerFont: <font>, .smallFont: <font>
Defines the fonts used for doubler dice. The doubler dice size depends on the board size. If the board size is too small, the smallFont will be used.
*board.cursor: <cursor>
Sets the cursor to be used for the board widget(s).
.humanStones: <black|white>
If you want to play the white stones set this resource to "white". ("Black" is Default.)
.watchmove: <true|false>
If watchmove is true, you can see the stones "fly", when the computer moves.
.delaytime: <seconds>
Sets a delaytime in tenth of a second, which gives you a closer look on the computer moves. Implies watchmove is set `false'.
.stonesteps: <pixel>
You can speed up the stones by giving this resource a greater value. Implies watchmove is `true'.
.doubling: <true|false>
Sets the use of doubler dice. Since the doubling of the computer is still poor, you might wish to turn it off.
.buttonMove: <true|false>
If buttonmove is true, you can play by simply pressing a button. The left button sets the lower dice value, the right one the other. On equation both buttons can be used.
.numrollouts: <number>
Specifies the number of rollouts from a given position, before adding the result to a position file. Any unsigned integer value should be all right.
.positionfile: <name>
The file, where `xgammon' shall save and load all informations to-and-fro.

Diagnostics

`Xgammon' uses the function usleep() for delaytime. Usleep is not defined on some systems.
#define usleep(a) sleep(a)
is set then. As a result, you can only delay seconds, not tseconds.

Bugs

The program is still in state of development, so there are certainly bugs. `Xgammon' will save the current position in a `xgammon.sig_save' file on some signals. Please email this file to the authors. It may help find the bugs. If you can generate a core dump, gzip, uuencode and mail it, which would also be very helpful.

Otherdisplay:
Some popup resources and actions on ".otherdisplay" sometimes get lost.
Black can set white stones and vv. (funny feature ?)
 

Authors

Lambert Klasen and Detlef Steuer
email:
klasen@asterix.uni-muenster.de steuer@amadeus.statistik.uni-dortmund.de