MAHJONGG(6)

NAME
mahjongg - Solitaire game using mahjongg tiles written for sunview

SYNOPSIS
/usr/games/mahjongg [ -n ### ] [ -b ] [ -c ]

DESCRIPTION
Mah jongg is an ancient chinese game whose origins are supposed to date back around 3000 years. It is typically a four player game with similarities to most popular card games. This version is a solitaire game using the mahjongg tiles. It was inspired by a version originally seen on a PC.

This game was developed while toying with the idea of full color icons. Once we had them, it was necessary to find some "practical" use for them. Since we had never seen full color and black/white support built into a game, that also became a challenge. Mahjongg is the result.

THEORY OF PLAY
The object of the game is to remove all the tiles from the board in matching pairs. Tiles match only if they are identical. Exceptions are the flower and season tiles. Any season tile will match any other season tile and any flower tile will match any other flower tile. Tiles may be removed from the board only if they have either a left or a right edge open and they do not have a tile covering them.

The display is divided into two areas: the play area, which shows the tiles, and the control window, which shows the number of tiles remaining and the game control buttons. As tiles are removed the "Tiles Remaining" count will be updated and play related messages and mouse button defintions will be shown just below the control buttons in the control window.

Tiles are selected by placing the mouse icon on a tile and pressing the left button. To deselect a tile simply repress the left button while on the tile. Any time an invalid selection is made, any previous selections for that turn are cleared. After selecting a pair of tiles, you will be asked to confirm your choice. Press the left mouse button to confirm or the right mouse button to cancel.

HELP FEATURES
Two help features are currently implemented. By selecting the "help" button in the control window when no tiles are selected, you will be shown all available tile combinations. To see each combination press the left mouse button until no more moves are shown. To cancel "help" press the right mouse button. If you have selected a tile, pressing the middle mouse button or selecting the "help" button in the control window, will find the first matching tile (if any) starting at the top of the pile and working down. If a match is found, you will be asked to confirm and the pair will be removed from the board. If an alternate match is available pressing the middle button labeled "NEXT" will show it.

UNDO
Since some people tend to be a little faster on the mouse then they should be, the undo feature was implemented. The "undo" button replaces the previous pair that was removed from board. You can continue to press undo until you get back to a new board.

NEW and AGAIN
Selecting the "new" button in the control window restarts the game with a new board. Selecting the "again" button restarts the game using the same board. Either button may be used at any time during the game.

OPTIONS

-n  Start with board number ###. Boards through 20011 are available.

-c  Set color mode. Necessary to run in color on a Sun 3/60.

-b  Set black and white mode. Had color. Why not black and white?

DIAGNOSTICS

FILES
/usr/games/mahjongg    executable

AUTHOR
Copyright 1988 Mark A. Holm
<tektronix!tessi!exc!markh>

ACKNOWLEGED CONTRIBUTORS
Dorothy Robinson (Prime-CV Beaverton) 		Tiles
Jim Batch	 (Prime-CV Beaverton)		Theory and code help
Gilbert Harrus   (Gip-Altair/INRIA)		Shuffling algorithm
Jim Flar (??)	 (Sun)				New selection and help

BUGS
If a tile is selected when the game goes iconic it is not drawn as selected when the game is re-opened, the board returns to normal after the next icon pair is removed or by pressing undo (backs up one move).

Sunview option "-WI iconfile" only works in black and white.

Board number is not checked very close. If you put something weird in, you deserve everthing you get.

No score file. It is up to you to keep track of who did how well on what board.

Not as pretty in black and white.