	X-BASED DINO
	=============	Dino X widgets, V5.0


    It has been tested on the following platforms:

	Sun4, SPARC		SunOS 4.1.3	X11R4
	Sun4, SPARC		SunOS 5.4	X11R5
	PC, 486			Linux 1.0.9	X11R5(*)
	PC, 486			Linux 1.2.8	X11R6(**)

    *	Keypad 5 key may not work, in which case, try it with the
	Num-Lock on
	/usr/lib/X11/etc/xmodmap.std .  If not defined
    **	Keypad may not work, since various keycodes may not be defined
	by default.  Check that "KP_1 - KP_9, Home, Up, Prior, Left,
	Begin, Right, End, Down, Next" are defined towards the end of
	cp /usr/lib/X11/etc/xmodmap.std /usr/lib/X11/xinit/.Xmodmap
	and then motify this or create your own at ${HOME}/.Xmodmap .
	You should just have to uncomment them (get rid of some '!').
	This should be done before X is started.

    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?

    Do you have Motif?  If so, uncomment line 28 of Imakefile.

    It should be easy. Edit the Imakefile (or Makefile.std, see below)
    for appropriate settings of variable SCOREFILE, then do:
	xmkmf
	make
	xdino  [motif version will be xmdino]

    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
        xdino

    or if you have Motif, uncomment appropriate sections, then try:
	make -f Makefile.std all.xm
	xmdino

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

ANYTHING SPECIAL IN USING?

    Click on the left mouse button to move CCW (3d only).
    Click on the middle mouse button toggle the practice mode. (This is
      good for learning moves).  Also 'P' or 'p' does the same thing.
      One must double click on the middle mouse button if the puzzle is
      being worked on.
    Click on the right mouse button if you want to randomize the cube.
      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.
    '2' (not the keypad 2) to set period 2 mode.
    '3' (not the keypad 3) to set period 3 mode.
    'B' or 'b' to set both period 2 and period 3 mode.
    'S' or 's' to auto-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 2d dino as:
    7   8   9
        ^
    3 <   > 6
        v
    1   2   3

    The key pad along with the use of the mouse will allow you to move
    i.e.,
    KP_7=>TopLeft  	KP_8=>Top       KP_9=>TopRight
    KP_3=>Left                          KP_6=>Right		
    KP_1=>BottomLeft    KP_2=>Bottom    KP_3=>BottomRight
    Note: Top, Left, Right, and Bottom only work when the control key
    is pressed and there is no analog for 3d dino.

    Key pad for 3d dino, use your intuition (is this a cop out or what?).
    The key pad is defined differently depending on which side of the cube
    your mouse is pointing at.

    The shift keys will allow one to move the center of the cube.  The
    2 opposite corners do not move.

    The alt keys will allow one to access "Period 2" turns from "Both"
    mode, otherwise it assumes "Period 3" turning. Edges turn in
    "Period 2" and corners  turn in "Period 3".  The "Period 2" mode has
    extra cuts around the faces.

    The control key allows you to move the whole cube at once without
    being entered as a move.  Hold down the control key while using the
    left mouse button or the keypad.
 
    Try resizing the cube. Notice the puzzle resizes to take advantage
    of the "room" available.

    The title is in the following format (non-motif version):
	xdino{2|3}d.{2|3|both}: (<Number of moves>/\
		{<Record number of moves>|NEVER|PRACTICE}) - <Comment>
    {2|3}: current dimensional view
    {2|3|both}: current turning mode or both modes.
    {<Record...}: puzzle is either in practice mode or record mode
       In record mode, if there is no record of the current puzzle, it
       displays "NEVER".

    If you were looking for a auto-solver, sorry.  If you know of one
    let me know.

    Also a tesseract (4D cube) would be nice. (Does such an analog exist
    for 4d?)

    Personally, I have solved "Period 3" mode using this program.
    The "Period 2" mode was suggested by Derek Bosch <bosch@sgi.com>.
    The physical puzzle ("Period 3") is now available.  It is called
    a Triangle - 4 Cube - Dinosaur with colored dinosaurs on it, (or
    Triangle - 4 Cube - 6 Colors with solid colors, (a 4 color and a 
    2 color are also available with point oriented coloring)).

    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.  The format will probably change to become more readable.
    Consider the 2d cross representation:

    practice: 0 false, 1 true
    moves: 0-MAXINT

    starting position:
      0       R     where the starting unrandomized faces would be,
    1 2 3   Y W G   each face has 4 corners
      4       O     if orient mode, orientation number follows face number
      5       B       0 up, 1 right, 2 down, and 3 left.

    This is then followed by the moves
    move #: face corner direction control
      each turn is with respect to a corner on a face.  The corners
      start at the upper right and work clockwise.
    Direction is represented as 0 upper right, 1 lower right, 2 lower
      left, 3 upper left, 5 clockwise, 7 counterclockwise, 8 up, 9 right,
      10 down, and 11 left.
    Style is represented as 0, 1, or 2, 0 if just a corner is rotated, 1
      1 if the center of the cube is moved, and 2 if a period 2 twist.
    Control is represented as 0 or 1, 1 if the whole cube is moved at once
      (here i and j do not matter), 0 if not.  The xdino 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

   [Oct 06, 95]	V5.0: Xt/Motif, your choice.
   [May 16, 95]	V4.10: Xt version.
   [Jun 06, 95]	V4.10.1: Period 2, Both and Orient modes added.
