.\" Copyright 1991 Stan K. Tazuma .\" $Header: /home/sirius/skt/cmds/src/sun/mj/RCS/mahjongg.6,v 2.3 91/12/22 17:06:29 skt Exp $ .\" .\" Copyright 1988 Mark A. Holm .\" .\" Permission is given to copy and distribute for non-profit purposes. .\" .TH MAHJONGG 6 "20 December 1991" .\" .TH MAHJONGG 6 "20 May 1988" .SH NAME mahjongg \- Solitaire game using mahjongg tiles written for SunView and XView .SH SYNOPSIS .B mahjongg [ \fB-n \fI###\fR ] [ \fB-b\fR ] [ \fB-c\fR ] [ -P ] [ -PB ] [ -B ] [ -BB ] [ -C ] [ -D ] [ -N ] [ -T ] [ -E ] .SH DESCRIPTION .I 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. .PP 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. .PP (The above text was written for the 1988 SunView version. The 1991 X11/XView version was inspired and derived from the SunView version. This new version was developed with the desire to provide the same look-and-feel and game-playing interface as the SunView version. Consequently, all of the tile images and much of the source code from the SunView version was re-used in the XView version.) .SH 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. .PP 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. .PP 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. .SH 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. .SH 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. .SH 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. .SH OPTIONS .IP \fB\-n \fI###\fR Start with board number ###. Boards through 20011 are available. .IP \fB\-c\fR Set color mode. Necessary to run in color on a Sun 3/60 (SunView version). .IP \fB\-b\fR Set black and white mode. Had color. Why not black and white? .PP Below are options available only in the XView version. .IP -P Configure control area to use normal background color. .IP -PB Like -P option, but the buttons are all colored black. .IP -B Like -b option, but uses black background in the play area. This really only works when used on a color display. .IP -BB Like -B option, but uses black game tiles. This only works when used on a color display. .IP -C Configure game area to use normal background color. Warning, this option turns on the -D option described below. .IP -D Don't use direct color manipulation for tile highlighting (color inversion). This option minimizes usage of color map entries but response to tile selections is slower. .IP -N Use pixrects instead of server images for panel icons. With this option, you may see some warning messages on the console or in the window from which you started mahjongg. These messages are expected and should be ignored. This option slightly reduces X server memory usage, but it is not recommended because of the warning messages. .IP -T Use pixrects instead of server images for game icons. Reduces X server memory usage a fair amount, but slows down screen updates. Not recommended unless your X server is short of memory. .IP -E Enables the sounding of the bell when you make an error during play. By default, the program acts silently. This option also depends on your X server being configured to allow error bells. .SH DIAGNOSTICS .SH FILES mahjongg executable .br mahjongg.info help file for XView version .SH AUTHORS XView version, excepting icons and certain source code re-used from SunView version, is Copyright 1991 Stan K. Tazuma (skt@sundry.boeing.com, uw-beaver!bcsaic!sundry!skt). .sp SunView version is Copyright 1988 Mark A. Holm. .br .SH ACKNOWLEGED CONTRIBUTORS .PP The following people are acknowledged by Mark A. Holm as contributing to the SunView version. Since the tiles, shuffling algorithm, and selection and help features for the XView version were ported from the SunView version, these persons should be similarly credited (indirectly) for the XView version as well. .nf .na 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 .fi .ad .SH 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). (This bug does not occur in the XView version.) .PP Sunview option "-WI iconfile" only works in black and white. .PP Board number is not checked very closely. If you put something weird in, you deserve everthing you get. .PP No score file. It is up to you to keep track of who did how well on what board. .PP Not as pretty in black and white. .PP For the XView version, the program won't work right if you run in black and white mode on a color display, and also specify background and foreground colors.