xcubes
======

A Cubes Widget

Web: http://www.tux.org/~bagleyd/puzzles.html

Download: Primary site: ftp://ftp.tux.org/pub/tux/bagleyd/xpuzzles
          Secondary site: ftp://ibiblio.org/pub/Linux/games/strategy

Maintainer: David A. Bagley <bagleyd@tux.org>


  Try resizing the puzzle.  Notice the puzzle resizes to take advantage of
  the "room" available.

  I stole many good things from the X11 "puzzle" by Don Bennett (except
  his sliding  image).  This program completes a theme with xtriangles and
  xhexagons. This program could be further generalized to do a tesseract
  the puzzle but in fact, it gets no harder than the 2-D puzzle except that
  its more tedious.

  Keep in mind that the puzzle portion 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 and instructions
  on how to operate.

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

MATHEMATICAL STUFF USED IN CONSTRUCTION

  Assuming it is a box of i columns, j rows, and k stacks and the
  numbering starts from 1.
    Corner 1-> 1
           2-> i
           3-> i*j-i+1
           4-> i*j
           5-> i*j*k-i*j+1
           6-> i*j*k-i*j+i
           7-> i*j*k-i+1
           8-> i*j*k
    Center -> i%2 =>
           0: None
           1: ((i+1)/2)^3

    Max_Width -> i units
    Max_Height -> j units
    Max_Depth -> k units

    Start -> x=y=z=0
    Next -> n%i =>
           0: x= 0 units; y+= 1 unit
              if (y == j)
                 {y = 0 units; z+= 1 unit;}
           default: x+= 1 unit

    Same row? -> (m-1) / i == (n-1) / i
    Same column? -> ((m-1) % i == (n-1) % i) &&
                     ((m-1) / (i*j) == (n-1) / (i*j))
    Same stack? -> (m-1) % (i*j) == (n-1) % (i*j)

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
  be able to duplicate them.
