DRAGON

Section: User Commands (1)
Updated: 18 April 1989
Index Return to Main Contents
 

NAME

dragon - Mah-Jongg game  

SYNOPSIS

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

DESCRIPTION

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.

 

OPTIONS

The dragon program accepts all of the standard X Toolkit command line options along with the additional options listed below:
-help
This produces a verbose message describing the command line options.
-cursor name
Normally dragon uses the "hand2" cursor. Use this option to use your favorite cursor instead.
-double interval
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.
-icongeometry geometry
Use this option to specify the geometry to be used for the dragon icon. There are two sizes that dragon prefers, 32x32 and 64x64.
-iconic
Use this option and dragon will first appear as an icon. Use the +iconic form and dragon will not first appear as an icon.
-iconname name
Use this option to set the name of dragon's icon.
-reverse
Use this option for reverse-video and use the +reverse option for normal-video.
-shadows
Use this option and tiles will not have 3-D shadows and use the +shadows and tiles will have (the default) 3-D shadows.
-sides type
This option can be used to specify the way that tile sides are drawn. There are four possiblities. "gray" (the default), "black", and "line".
 

MOUSE BUTTONS

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.  

MENU BUTTONS

There are several buttons visible in dragon's window and there are two sets of buttons. The inital set includes:
New Game
Press this button to reshuffle the tiles and start a new game.
Restart
Press this button to restart the current game. This gives you a chance to try again.
Save
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.
Other
Press this button to get to the other set of buttons.
Hint
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.
Restore
Press this button to read the $HOME/.dragon-save file and to resume a saved game.
Quit
Press this button to exit the game.

The other set of buttons include:

Redraw
Press this to cause the board to be redrawn.
Sides
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.
Other
Press this to get back to the first set of buttons.
Cheat
Press this button to toggle Cheating mode. When this is turned on you can remove any two arbitrary tiles. Don't cheat!
Sync
Press this button to turn on synchronous mode. This makes dragon synchronize everything with the X Server; it is typically used only for debugging.
 

X DEFAULTS

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:
cursor (class Cursor)
Specifies the name of the cursor to use. The default is "hand2".
doubleClick (class DoubleClick)
Specifies the maximum time to allow between the two clicks that form a double-click. The default is 250.
iconGeometry (class IconGeometry)
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.
iconName (class IconName)
Specifies the name for the icon. The default is NULL.
reverseVideo (class ReverseVideo)
Specifies TRUE for reverse-video effects and FALSE for normal-video. The default is FALSE.
tileShadows (class TileShadows)
Specifies TRUE if tiles are to have 3-D shadows and FALSE if not. The default is TRUE.
tileSides (class TileSides)
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.
 

SEE ALSO

X(1)  

BUGS

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

COPYRIGHT

None; have fun.  

AUTHOR

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


 

Index

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

This document was created by man2html, using the manual pages.
Time: 06:08:57 GMT, December 12, 2024