	X-BASED MISSING LINK(tm)
	====================	Missing Link X widget, V4.10


    It has been tested on the following platforms:

	Sun4, SPARC		SunOS 4.1.3	X11R4
	Sun4, SPARC		Solaris 2.3	X11R5
	PC, 486			Linux 1.0.9	X11R5

    If yours is not in this list, please let me know -- thanks. The
    most updated source could be found on ftp.x.org under
    /contrib/games/puzzles.

HOW TO BUILD?

    It should be easy. Edit the Imakefile (or Makefile.std, see below)
    for appropriate settings of variable SCOREFILE, RANDOM, then do:
	xmkmf
	make
	xmlink

    If that does not work then:
	mv Imakefile Imakefile.r5
	sed 's/^XCOMM/\/\*\*\/#/' > Imakefile < Imakefile.r5
	xmkmf
	make
	xmlink

    Note: if you don't have 'xmkmf' or the "Makefile" it generates
    doesn't work well, edit Makefile.std for appropriate settings for
    XINCLUDEPATH and XLIBPATH, then try:
	make -f Makefile.std

    You should have Mlink.ad copied to $(HOME)/Mlink or 
    /usr/lib/X11/app-defaults/Mlink to run, especially if the background
    is similar to one of the faces. Edit this file for your preferences.
    You might want to move xmlink into /usr/bin/X11 (or wherever your
    X binaries are).
    You might also want to move xmlink.man to /usr/man/man6/xmlink.6

    I also did not confirm that all the puzzles can be solved when
    randomized.  It does appear to be the case though.  The last few
    tiles are a trick to place.

    Monochrome users may have to run it with -tile Black or -tile White.
    Whatever works for you.

    Also the program is in the ALPHA state, so suggestions are always
    welcome.  (I know already that it does not have a self-solver).
    I noticed that sometimes one may double click on a mouse button
    unintentionally, which leads to an unexpected result.  Also if
    the arrow keys stop working, just move the window a little and it
    should be OK again.

ANYTHING SPECIAL IN USING?

    Click on the left mouse button to move tile.  If you click in the
      same row and not on a blank, all the tiles from there will move
      towards the space.  If you click elsewhere then that column will
      move down.
    Click on the middle mouse button to move tile.  If you click in the
      same row and not on a blank, all the tiles from there will move
      towards the space.  If you click elsewhere then that column will
      move up.
    Click on the right mouse button if you want to randomize Mlink.
      Also 'R' or 'r' does the same thing.  One must double click on
      the right mouse button if the puzzle is being worked on.
    'O' or 'o' to toggle orient mode. (I prefer the orient mode since
      it is slightly more challenging).
    'M' or 'm' to toggle middle mode. All the middle tiles rotate
      together.  This is considerably more challenging.
    'S' or 's' to self-solve.  Unfortunately, its unimplemented.
    'U' or 'u' to undo last move.
    'E' or 'e' to enter saved puzzle.
    'W' or 'w' to write or save a puzzle.
    'Q', 'q', or Control-C to kill program.

    Key pad is defined for Mlink as:
        8 
        ^
    4 <   > 6
        v
        2

    Tiles can also be moved by the keypad,
    		KP_8=>TOP
    KP=>LEFT			KP_6=>RIGHT
    		KP_2=>BOTTOM

    Notice one can move more than one tile at a time by clicking on the
    tile farthest from the space but in a row with the space.

    The shift key along with the up and down arrows allow one to rotate
    the whole puzzle.

    The control key allows you to change the complexity of xlink.  Hold
    down control key and use the keypad.
 
    The title is in the following format:
	xlink: <int>x<int> {norm | ind} @ (<Number of moves>/\
		{<Record number of moves>|NEVER}) - <Comment>
    <int>x<int>: row by column.
    {norm | ind}: middle tiles rotate together or independent.
    {<Record...}: if there is no record of the current puzzle, it
       displays "NEVER".

    I chose to display the puzzle sideways because if I ever decide
    to implement the self solver, it will be easier because the IDEAL
    solution book shows it that way.
 
    Keep in mind that Mlink is a widget that can be simply stuck in
    other X programs. (If you find a use for this, let me know).

    Refer to the man page for detailed command line options.

    If you want further information on puzzles, I'll be glad :-) to send
    it to you.

SAVE FORMAT

    The format is not standard.  The reason is that this is simple to
    produce and I do not know what the standard is.  The format will
    probably change to become more readable.

    size_x: number of tiles in a row
    size_y: number of tiles in a column
    moves: 0-MAXINT

    starting position: array where 0 is the empty space

    This is then followed by the moves
    move #: direction tile shift
    Direction is represented as 0 up, 1 right, 2 down, and 3 left.
    Tile is the column of tile.
    Shift is represented as 0 or 1, 1 if the whole puzzle is moved at
      once (here Tile does not matter), 0 if not.  The xmlink record keeper
      does not count a control move as a move, but here we do.

    Caution: the program may crash on corrupted input.

FOUND A BUG?

    Send bugs reports and fixes to the author. For bugs, please include
    as much information as to their location as possible, since I may not
    have the resources to duplicate the them.

	David Albert Bagley,	bagleyd@source.asset.com

HISTORY

   [May 16, 95] V4.10: Warnings removed from Sun's cc and lint and now
		include a random number generator.  Bug fixed where
		xmlink moved correctly but was hard to turn.
   [Mar 13, 95]	V1.4: Removed lint warnings and added a VMS make.com .
   [Nov 11, 94]	V1.3: Conservative guess for random number generator.
   [Nov 07, 94]	V1.2: Now allows undos, saves, and recalls.
   [Sep 19, 94]	V1.1: Initialize bug removed.
   [Aug 30, 94]	V1.0: Xt version.
