Pegasus InfoCorp: Web site design and web software development company

PANEX (6)

Panex X widget

SYNOPSIS

    /usr/games/xpanex [-geometry [{width}][x{height}][{+-}{xoff}[{+-}{yoff}]]] [-display [{host}]:[{vs}]] [-mono] [-{foreground|fg} {color}] [-{background|bg} {color}] [-{border|bd} {color}] [-tile {color}] [-pyramid{0|1} {color}] [-tiles {int}] [-{mode {int}|hanoi|panex}] [-delay msecs] [-username {string}]

DESCRIPTION

    The original Panex puzzle is from the Japanese Magic Company from the 1980's. Mathematicians at Bell Laboratories estimated the number of moves to swap 2 columns of order 10 to be 27,564 <= N <= 31,537. It came in two varieties: one with a blue and a yellow pyramid of order 10 on silver tiles; in the gold version pieces of each color look alike (i.e. no pyramid is drawn on them), this is a little harder.

    The original Tower of Hanoi puzzle is the invention of Edouard Lucas and was sold as a toy in France in 1883. The legend of 64 disks in the great temple of Benares of the god Brahma is also his invention.

FEATURES

    Press "mouse-left" button to move a tile the top tile in a column. Release "mouse-left" button on another column. It will not move if blocked.

    Double click on "mouse-right" button or press "R" or "r" keys to reset the puzzle.

    Press "M" or "m" keys to toggle between hanoi (one pyramid column) and panex (two pyramid columns) modes (they each have different rules). In Hanoi, one can not place larger trapezoid on a smaller trapezoid. Here the goal is to move the pile from the left peg to the rightmost peg. In Panex, a tile can not go lower that its initial starting point. Here the goal is to exchange the 2 piles.

    Press "I" or "i" keys to increase the number of tiles.

    Press "D" or "d" keys to decrease the number of tiles.

    Press "S" or "s" keys to auto-solve. Unfortunately, its only implemented from the starting position.

    Press "U" or "u" keys to undo last move.

    Press "G" or "g" keys to get a saved puzzle.

    Press "W" or "w" keys to save a puzzle.

    Press "Q", "q", or "CTRL-C" keys to kill program.

    Unlike other puzzles in the collection there is no way to move pieces without drag and drop.

    The title is in the following format (non-motif version):

      x{hanoi | panex}: <Number of rows> @ (<Number of moves>/{<Record number of moves> <username>|"NEVER noaccess"}) - <Comment>

    If there is no record of the current puzzle, it displays "NEVER noaccess".

OPTIONS

    -geometry {+|-}\fIX\fP{+|-}\fIY\fP

      This option sets the initial position of the panex window (resource name "geometry").

    -display \fIhost\fP:\fIdpy\fP

      This option specifies the X server to contact.

    -mono

      This option specifies to display as if on a monochrome monitor (resource name "mono").

    -{foreground|fg} \fIcolor\fP

      This option specifies the foreground of the panex window (resource name "foreground").

    -{background|bg} \fIcolor\fP

      This option specifies the background of the panex window (resource name "background").

    -{border|bd} \fIcolor\fP

      This option specifies the border color of the tiles in the panex window (resource name "borderColor").

    -tile \fIcolor\fP

      This option specifies the tile color of the tiles in the panex window (resource name "tileColor").

    -pyramid0 \fIcolor\fP

      This option specifies the foreground of the first pyramid (resource name "pyramidColor0").

    -pyramid1 \fIcolor\fP

      This option specifies the foreground of the second pyramid, if it exists (resource name "pyramidColor1").

    -tiles \fIint\fP

      This option specifies the number of tiles in a column (resource name "tiles").

    -mode \fIint\fP

      This option specifies the hanoi (0) or panex (1) mode (resource name "mode").

    -hanoi

      This option specifies the hanoi mode (resource name "mode").

    -panex

      This option specifies the panex mode (resource name "mode").

    -delay \fImsecs\fP

      This option specifies the number of milliseconds it takes to move a tile or a group of tiles one space (resource name "delay").

    -username \fIstring\fP

      This option specifies the user name for any records made or else it will get your login name (resource name "userName").

SAVE FORMAT

    The format is not standard. The reason for this is that this is simple and I do not know what the standard is.

      mode: 0-1 <0 hanoi, 1 panex> tiles: 1-10 <number of tiles in a column> moves: 0-MAXINT <total number of moves> startingPosition: <array pairs of column and position of each tile>

    This is then followed by the moves, starting from 1.

      move #: <from_column> <to_column>

    from_column is the top tile of the column to_column is where that tile is moved to. Caution: the program may crash on corrupted input.

REFERENCES

    Sliding Piece Puzzles (Recreations in Mathematics Series) by L. E. Horden, Oxford University Press 1986, pp 144, 145. Puzzles Old & New (How to Make and Solve Them) by Jerry Slocum & Jack Botermans, University of Washington Press, Seattle, 1987, p 135. Quantum January/February 1996 pp 55-57, 50-51. (Author's name not present on my copy).

SEE ALSO

COPYRIGHTS

    \*R Copyright 1996-97, David Albert Bagley

BUG REPORTS AND PROGRAM UPDATES

    Send bugs (or their reports, or fixes) to the author

      David Albert Bagley, <bagleyd@bigfoot.com>

    The most updated source could be found on ftp.x.org under /contrib/games/puzzles.