Amiga Unix — 68040 · 68060

Manual pages › X Window System programs (1X)

dragon(1X)

Mah-Jongg game

From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.

NAME · SYNOPSIS · DESCRIPTION · OPTIONS · MOUSE BUTTONS · MENU BUTTONS · X DEFAULTS · SEE ALSO · BUGS · COPYRIGHT · AUTHOR

dragon - Mah-Jongg game

dragon [-cursor name] [-double interval] [-icongeometry geometry] [-/+iconic] [-iconname name] [-geometry geometry] [-/+reverse] [-/+shadows] [-sides type] [-/+sticky]

Dragon plays a version of the game of Mah-Jongg.

Mah-Jongg is played with a set of tiles. The tiles are set out in a particular pattern and the object of the game is to eliminate all of the tiles. Dragon plays with the tile pattern known as "The Dragon". This pattern has 5 levels of tiles. From above, this pattern somewhat resembles a sleeping dragon.

Tiles are removed from the game two at a time. The two tiles removed must "match" and they must both be "free".

A tile is "free" if on the left or on the right side there is no tile that is on the same stacking level as this tile. There may be tiles that are at a lower level than this tile but not one at the same or higher level. To select a free tile for removal just click on it. Dragon will refuse to select a tile that is not free. To remove a pair of tiles simply double-click on one of the tiles. You have the option of selecting one tile and then double-clicking on the second or else selecting both tiles and then double-clicking upon either tile.

Two tiles match if a) they both have the same picture upon their faces, b) they are both flowers, or c) if they are both seasons.

There are seven types of tile.

Flowers - There are four tiles that represent flowers. These are the Orchid, the Plum, the Mum, and the Bamboo tiles. Any two flowers match.

Seasons - There are four tiles that represent the four seasons. These are the Spring, Summer, Autumn, and Winter tiles. Any two seasons match.

Dragons - There are three types of dragons and there are four each of the dragons. There is the Red dragon, the White dragon, and the Green dragon. Only two dragons of the same type match each other.

Winds - There are four each of the four winds. These are the East, West, North, and South tiles. Only two winds from the same direction match each other.

Bams, Dots, and Craks - These tiles are numbered 1 through 9. There are four each of each numbered tile. Only two tiles of the same type with the same number match each other.

The dragon program accepts all of the standard X Toolkit command line options along with the additional options listed below:

This produces a verbose message describing the command line options.
Normally dragon uses the "hand2" cursor. Use this option to use your favorite cursor instead.
In order to play the game you must double-click upon tiles. This option allows you to set the maximum time interval between clicks that separate the two clicks that make up a double click. The default is 250 milliseconds. Clicks further apart than this will be treated as separate single clicks instead of one double click.
Use this option to specify the geometry to be used for the dragon window. There are five sizes that dragon prefers, 450x340, 650x500, 870x660, 1080x820, and 1290x980.
Use this option to specify the geometry to be used for the dragon icon. There are two sizes that dragon prefers, 32x32 and 64x64.
Use this option and dragon will first appear as an icon. Use the +iconic form and dragon will not first appear as an icon.
Use this option to set the name of dragon's icon.
Use this option for reverse-video and use the +reverse option for normal-video.
Use this option and tiles will not have 3-D shadows and use the +shadows and tiles will have (the default) 3-D shadows.
This option can be used to specify the way that tile sides are drawn. There are four possiblities. "gray" (the default), "black", and "line".
By default, the first selection is "sticky" (+sticky) which means that attempts to select a second tile that is free but which doesn't match the first are rejected. If the first selection is not sticky (-sticky), an attempt to select a free tile that doesn't match the first will deselect the first tile and leave only the second selected.

Click button 1 on any tile to select it. Click on any menu button to activate it.

Click button 2 to obtain a (next) hint on a possible move. See the Hint menu button below for more information.

Click button 3 to remove two selected tiles from the game.

There are several buttons visible in dragon's window and there are two sets of buttons. The inital set includes:

Press this button to reshuffle the tiles and start a new game.
Press this button to restart the current game. This gives you a chance to try again.
Press this button to save the current game into the file $HOME/.dragon-save. The current game is saved at the current point for later resumption.
Press this button to get to the other set of buttons.
This button can be used in two ways. First, if you are stuck for a move then just press this button repeatedly and dragon will show successive possible moves. Of course, there may not be any. Second, if you want to remove a particular tile but you cannot see any matching free tiles then select the tile and then press this button to see if dragon agrees with you that there aren't any matching free tiles.
Press this button to read the $HOME/.dragon-save file and to resume a saved game.
Press this button to exit the game.

The other set of buttons include:

Press this to cause the board to be redrawn.
Press this repeatedly to cycle through the available set of drawing options for the tiles. Samples Press this to display the full set of tiles. Press it again to get back to the game.
Press this to get back to the first set of buttons.
Press this button to toggle Cheating mode. When this is turned on you can remove any two arbitrary tiles. Don't cheat!
Press this button to turn on synchronous mode. This makes dragon synchronize everything with the X Server; it is typically used only for debugging.

Dragon's name is usually "dragon" and its class is "Dragon". It understands all of the core X Toolkit resource names and classes as well as:

Specifies the name of the cursor to use. The default is "hand2".
Specifies the maximum time to allow between the two clicks that form a double-click. The default is 250.
Use this option to specify the geometry to be used for the dragon window. There are five sizes that dragon prefers, 450x340, 650x500, 870x660, 1080x820, and 1290x980. The default is "450x340".
Specifies the geometry of the dragon icon. Preferred sizes are 32x32 and 64x64. The default is "64x64".
iconic (class Iconic)
Specifies TRUE to cause an iconic startup and FALSE for a normal startup. The default is FALSE.
Specifies the name for the icon. The default is NULL.
Specifies TRUE for reverse-video effects and FALSE for normal-video. The default is FALSE.
Specify TRUE for first tile selected to be sticky (default), FALSE for selection follows click.
Specifies TRUE if tiles are to have 3-D shadows and FALSE if not. The default is TRUE.
Specifies the type of sides to use when drawing tiles. The default is "gray" for gray sides. The other options are "black" for black sides and "line" for sides with lines.

X(1)

No known bugs. Send bug reports to geb@rational.com.

None; have fun.

Gary E. Barnes (Rational; geb@rational.com)

18 April 1989 X Version 11R3