File: README

package info (click to toggle)
xpuzzles 8.8.7%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,792 kB
  • sloc: ansic: 153,465; makefile: 6,283; sh: 935; perl: 80
file content (94 lines) | stat: -rw-r--r-- 3,318 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
xcubes
======

A Cubes Widget

Web: https://www.sillycycle.com/puzzles.html

Download: Primary site: https://www.sillycycle.com/puzzles
          Secondary site: http://ibiblio.org/pub/Linux/games/strategy

Maintainer: David A. Bagley <bagleyd AT verizon.net>

  To build you need at minimum both of these, X11 and Xt (unless you are
  looking to build win32).
    sudo apt-get install libx11-dev
    sudo apt-get install libxt-dev
  You may need to install one of these to build Motif version:
    sudo apt-get install libmotif-dev (strongly recommended)
    sudo apt-get install lesstif2-dev (defunct)
  As an alternative to Motif you can use Athena (and its variants):
    sudo apt-get install xaw7-dev
    (Also could use XAW3D xaw3d-1.6.3-3-x86_64.pkg.tar.zst)
  You need to install XPM if you want color icons:
    sudo apt-get install libxpm-dev (strongly recommended)
  To install XMU if you want editres:
    sudo apt-get install libxmu-dev (probably not useful)
  To install sound libraries (all defunct):
    sudo apt-get install librplay3-dev
    sudo apt-get install libesd0-dev
    sudo apt-get install libaudiofile-dev
    sudo apt-get install nas-dev
    sudo apt-get install pulse-dev
    In place of these it is just configured by default with
      --enable-def-play=play.sh
  Then should be a simple
    configure; make

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

  Note: if using Athena and want the popups to be able to be closed when
    using a close window button in top bar, uncomment translations stuff
    in app-defaults file (.ad file) prior to "make install".  This may
    lead to warnings if for example the Motif version also exists.

  Try editing the file XCubes.ad to get a certain feature and then
  copying to $(HOME)/XCubes (where XCubes is the file name) and
  running xcubes again.  There is also a Windows port (wcubes).

  I stole many good things from the X11 "puzzle" by Don Bennett.   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.

  Refer to the man page for detailed command line options and instructions
  on how to operate.

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.