8.9.3

wpyraminx
=========

A Pyraminx 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 (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 XPyraminx.ad to get a certain feature and then
  copying to $(HOME)/XPyraminx (where XPyraminx is the file name) and
  running xpyraminx again.  There is also a Windows port (wpyraminx),
  though not all features are included.

  The auto-solver here only works for size 2 and 3 (for both non-oriented
  and oriented centers) for Period 2.  For Period 3 it works for size 2,
  3, and 4 (for both non-oriented and oriented centers).  One of the
  problems in auto-solvers the generally do not work for different number
  of cuts.

  Personally, I have solved 1-3 in  "Period 2" mode, 1-4 in the
  "Period 3" mode, 1-2 in the "Both" mode, and "Sticky" I only
  solved it in "Period 3".

  Refer to the man page for detailed command line options.

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.

other stuff to do
  1. auto-solve only works when it has period 2 movement and size less
    than 4 or if period 3 movement and size less than 5.  Additionally,
    add a solution when its combination of both period 2 and period 3.
  2. GL work
    a. add a select from GL to accurately capture position (can use
      control to move whole puzzle from GL screen), so currently have
      to move from 2D view. (Its currently very inaccurate.)
    b. some issue orient lines at times.
    c. add period 4 movement, analogous to the Rubik Cube.  This gives
      it a more jumbled look as the faces would not line up.
  3. one should be able to move the trivial corner with the second level
    in period 3 mode without it counting as an extra move.

Updates:
  [Mar 01, 2026]  V8.9.3:
    Added more OpenVMS build support with descrip.mms.
  [Mar 23, 2025]  V8.9.0:
    Editres added.
    Added config.mms for building on VMS.
  [Feb 10, 2025]  V8.8.9:
    Updated Windows and VMS settings.
    Fixed Motif radio buttons broken in 8.8.8.
  [Jan 25, 2025]  V8.8.8:
    Fixes for VMS.
  [Oct 24, 2024]  V8.8.7:
    Got the orient lines on GL better.
    Orient lines fixed.
  [Sep 25, 2024]  V8.8.6:
    Fixed some hard coding, some minor drawing errors and now can be
      to any size for GL.
  [Sep 12, 2024]  V8.8.5:
    Fixed some hard coding, some minor drawing errors and extended to
      size 6 for GL.
  [Aug 15, 2024]  V8.8.4:
    Fix for frame color.
  [Jun 14, 2024]  V8.8.2:
    Fixed move count when undoing.
    For keyboard, ignore moves that do not work in GL.
    Fixed some bugs relating to selecting facet in GL.  Still very
      approximate.
    Fixed when making period 2 move from GL, it would move period 3 in
      2D window.
  [May 31, 2024]  V8.8.1:
    Moving resource file from Pyraminx to XPyraminx to follow standard.
    Revamped default install to install for Gnome/KDE.
  [Apr 28, 2024]  V8.7.9:
    Fixed blank facets for control movement of size 5 and period 2.
  [Mar 28, 2024]  V8.7.8:
    Added period 2 turning.
    Fixed some hard coding and extended to size 5 for GL.
    Fixed a bug where it might not refresh going into sticky mode.
  [Feb 23, 2024]  V8.7.7:
    Fixed movement for size 1.  Reorganized the movement code for GL.
  [Jan 31, 2024]  V8.7.6:
    Start for GL interface.  See TODO for current list of things being
      worked on.
  [Aug 09, 2023]  V8.7.1:
    Fixing configure to not use -std=c89 as it may not always work with
      installed includes.
  [Jul 11, 2023]  V8.6.9:
    Fixed so sticky mode can be set at command line.
    Sticky mode for period 2 enabled for auto-solve.
  [May 05, 2023]  V8.6.7:
    Clicking on edge of puzzle could cause it to error out.
  [Apr 06, 2023]  V8.6.6:
    Athena: fixing bug to change radio button from keyboard.
  [Mar 15, 2023]  V8.6.5:
    Auto-solve added for size 3 period 2.
    Minor auto-solve fix when extended to higher orders.
  [Feb 19, 2023]  V8.6.4:
    Auto-solve added for size 2 period 2 and size 4 period 3.
    Athena: puzzle misnamed internally so command line options did not
      work since V8.6.0.
    Added compile option for searching for particular moves.
  [Dec 16, 2022]  V8.6.2:
    Athena: Simplified menu code and fixed check.
    Athena: Added radio button.
  [Dec 14, 2022]  V8.6.1:
    Updating Athena libs as seen in xterm build and adding XawPlus.
    Fixing up and down bitmaps.
  [Dec 09, 2022]  V8.6.0:
    Redesign gui parts as getting too unwieldy.  Ripping out xgui.h
      xgui.c from main file.
    Athena: Adding new spinner, updating old slider and toggle.
  [Oct 31, 2022]  V8.5.6:
    Updating for Xaw3dxft and neXtaw.
  [Oct 14, 2022]  V8.5.5:
    Athena: Added label for pulldowns.
    Athena: Fix for mode quick key.
  [Oct 04, 2022]  V8.5.4:
    Motif/Athena: Updated menus and popup titles.
    Motif/Athena: Added sound toggle in menu.
  [Sep 01, 2022]  V8.5.3:
    Updated to use XtAppInitialize from XtInitialize.  This helped fix
      Athena issue when killing dialog by window exit and bringing
      down application (WM_PROTOCOLS nonsense).
    Athena: popup window title bar close handled better.
    Athena: added scroll bar dialog box for features.
    Athena: initialize to synchronize with handle command line options.
  [Jul 30, 2022]  V8.5.2:
    Athena scrolling fix and menus added.
  [Jul 11, 2022]  V8.5.1:
    Cleanup and configuration updates.
  [Jul 07, 2022]  V8.5.0:
    Athena version, because I got complaints about Motif being old.
  [Jan 20, 2021]  V8.4.0:
    Updated scores to recover some corruption, say from from an empty
      file.
  [Dec 07, 2020]  V8.3.1:
    Handle corrupted buffer better.
  [Nov 19, 2020]  V8.3.0:
    'r' is now for redo and 'g' for get record (formerly read record).
  [Apr 11, 2020]  V8.2.7:
    Fixing a few buffer overflows from latest gcc.
  [Apr 04, 2020]  V8.2.6:
    Lots of spelling errors fixed due to codespell
      https://manpages.debian.org/testing/codespell/codespell.1.en.html
    Updated references to website to https.  https://www.sillycycle.com
  [Feb 15, 2019]  V8.2.1:
    Fixed spinner to not wrap and be unlimited where appropriate.
  [Oct 02, 2018]  V8.2.0:
    Removing strcpy and strcat calls by migrating to strncpy and strncat.
      Added HAVE_SNPRINTF compile-time option.
  [Jul 21, 2018]  V8.1.8:
    Fixing sound installation.
    Fixing a check for free from clang.
  [Apr 03, 2018]  V8.1.7:
    Updated to use spinner (using latest Motif  ;) ).
  [Oct 15, 2017]  V8.1.4:
    Removed gcc 7 warnings.
  [Oct 01, 2017]  V8.1.3:
    Updates for 64 bit compilation in Windows.
  [Aug 01, 2017]  V8.1.1:
    Valgrind helped find some definite memory leaks.
  [Jul 17, 2017]  V8.1.0:
    Updated sound configuration for X version.  Uses a simple included
      script play.sh, that is now used by default.
  [Sep 13, 2016]  V8.0.5:
    Old website http://www.tux.org/~bagleyd died, shifted code base to
      new website http://www.sillycycle.com
  [Feb 24, 2015]  V8.0.0:
    Sound and install fixes.
  [May 13, 2014]  V7.7.4:
    Synchronized save and restore with Java version.
  [Jan 20, 2014]  V7.7.3:
    Reorganized pixmap directory.
  [Jan 10, 2013]  V7.7.1:
    Cleaned up some duplication in Motif menu.
    Added scroll to feature help dialog.
    New bold fontlist in resource file, so things are easier to read.
  [Oct 22, 2010]  V7.6.4:
    Changed key mappings g->r for read file, r->e for redo.
  [Jun 29, 2010]  V7.6.3:
    Added extra keys F12 for CW and F11 for CCW.
  [Jan 21, 2010]  V7.6:
    Version handling changed to a single version.h (and man page).
    Sound fixed for esound.
  [Nov 10, 2009]  V7.5.1:
    Windows version: added accelerator for references.
  [Jun 05, 2009]  V7.5:
    Cleaned up menu look.
    Fixed again for NAS sound.
  [Dec 14, 2008]  V7.4.3:
    Fixed for NAS sound.
  [Jul 21, 2008]  V7.4.1:
    Strange character at end of help title removed.
    Fixed a possible timing auto-solve problem.
  [Jul 11, 2008]  V7.4:
    Leading function names in lowercase.
    Fixed turning bug when selecting face 2 then face 1 when horizontal.
  [Feb 29, 2008]  V7.3.4:
    Changed pointer from crosshair to hand2.
  [Dec 24, 2007]  V7.3.3:
    Constants changed.
  [Nov 06, 2007]  V7.3.2:
    Updated action codes and synchronized Java and C code.
    Various small changes.
  [Apr 10, 2007]  V7.3.1:
    Sound added.
  [Feb 23, 2007]  V7.3:
    Html no longer corrupted.
    reverseVideo update.
  [Dec 12, 2006]  V7.2.6:
    Changed default so that practice is true.
    Now use http://netpbm.sourceforge.net to generate images from xpm.
  [Nov 09, 2006]  V7.2.5:
    Drag and drop between adjacent faces.
    Fixed minor drawing errors for orient lines.
    Fixed bug when changing to period 2.
  [Oct 11, 2006]  V7.2.4:
    Fixed menu to assure the ok part of queries is handled correctly.
      (Bug fixed from redo change).
  [Jul 21, 2006]  V7.2.2:
    Fixed assorted memory leaks and uninitialized memory access reads.
    r is now for redo.  z is now the character for randomize.
  [Jun 10, 2006]  V7.2.1:
    Recognize solved when doing undo where practice option exists.
  [Apr 01, 2006]  V7.2:
    Made usage string compatible with versions of Motif and screen.
    More defensive code in case getlogin fails.
  [Oct 05, 2005]  V7.1.5:
    scoreFile and userName fixes
    -version added
    -score added
    Common option help for X and X-Motif
  [May 31, 2005]  V7.1.4:
    Separated out compatible components.
  [Feb 8, 2005]  V7.1.3:
    Mouse wheel for Windows now works.
  [Nov 21, 2004]  V7.1.2:
    Small changes synchronizing with Java code.
  [Aug 23, 2004]  V7.1:
    Thanks to Debian maintainer Florian Ernst <florian AT uni-hd.de> for
      fixing a compilation problem with X and without Motif.
    Added font option.
  [Dec 15, 2003]  V7.0.1:
    The Hide functionality of the Escape key now iconifies or drops in
      task bar.
    Integrated winpuz6.5 (Windows 3.1/95) into X source tree.
    Todo windows version:
      Interrupt on auto-solve not ported.
  [Oct 26, 2003]  V5.7.4:
    Mouse wheel scrolling added.
    Key press can now interrupt auto-solve too.
  [Aug 28, 2003]  V5.7.2:
    png for Gnome and KDE menus and xpm for CDE menus.
    install-games configure option and added other installation options.
    Added xpm for icon.
    Help kicked over.
  [Jul 07, 2003]  V5.7:
    Thanks to my daughter for banging on the keys:
      Resetting key sliders and toggles should reset display message.
      Fix for select and release done at the same time as
        clear, undo, randomize, or solve.
    Interrupt on auto-solve stolen out of X puzzle by Don Bennett, HP Labs
    Test for cheating from get and auto-solve.
    Popup for auto-solve if outside solve parameters
    "Periods:" string drawn next to radio buttons
    Clear now checks if you really want to randomize the puzzle using
      left mouse button, 'r' will not query
    'Esc' will hide the puzzle (actually osfCancel did the trick)
    Help & About expanded and pop-ups added
    Took out bitmaps since it takes too much room
  [Mar 21, 2003]  V5.6.2:
    Installation fixes for Motif and X versions.
  [Nov 06, 2002]  V5.6.1:
    VMS Motif fix and minor changes
  [Sep 06, 2002]  V5.6:
    configure if around 2nd AC_CHECK_FUNC
    removed Sun CC (char *) warnings
    removed hard coding of program name
    Cygwin changes ./, -lSM -lICE
    record store fix
    x and xm files combined using HAVE_MOTIF
    port back from Java (on the Java side I got some help from
        Sarat Chandran <saratcmahadevan AT yahoo.com>)
      use -1 for NEVER instead of 32767
      handle nobody = (null)
      .data->.dat for consistency
      background/foreground set by default
      frame color change on enter/leave
      allow more arrow keys (osf)
      menu
      split line should be a bit longer
      DOWN=0
  [Sep 01, 2001]  V5.5.4: g++ 3.0 warnings removed.
  [Mar 27, 2001]  V5.5.3: Infinite loop fix for ARM thanks to Matej Vela
    <mvela AT public.srce.hr>.
  [Nov 12, 1999]  Not released: Auto-solves in period 3 for 2x2x2 and 3x3x3.
  [Aug 11, 1999]  V5.5.2: Fixed runtime library problems when using configure.
  [Jun 20, 1999]  V5.5: Added -rv, fixed flashing on mono, and fixed core dump
    when window clicked initially with the left mouse button.
  [Jan 01, 1997]  V5.4: Username, concurrency check, configure, man page
    updates.
  [Apr 08, 1996]  V5.3: Minor changes.  Bug fix in monochrome mode.
  [Jan 31, 1996]  V5.2: Puzzle can now moved by a more intuitive drag and
    drop approach.  Pieces will invert, when selected.
    Now using dynamic allocation, so there is no maximum size.
  [Dec 15, 1995]  V5.1: Minor updates, RNG for 32/64 bit, border color
    to make faces look more realistic.
  [Oct 04, 1995]  V5.0: Xt/Motif, your choice.
  [Jun 06, 1995]  V4.10.1: Warning error fixed.
  [May 16, 1995]  V4.10: Warnings removed from Sun's cc and lint and now
    include a random number generator.  Bug fixed with control
    key of xpyraminx.  It turned the whole puzzle the wrong
    way.  More freedom in movement in using control+shift.
  [Mar 13, 1995]  V4.5: Removed lint warnings and added a VMS make.com .
  [Nov 11, 1994]  V4.4: Conservative guess for random number generator.
  [Oct 04, 1994]  V4.3: Now allows undos, saves, and recalls.
  [Jun 28, 1994]  V4.2: Can accommodate a auto-solver.
  [Jun 15, 1994]  V4.1: Record array was too small.
  [Jun 03, 1994]  V4.0: Xt version.
    I got some good ideas from oclock.
  [Apr 01, 1993]  V3.0: Motif version.
    I got some good ideas from Douglas A. Young's
    book: "The X Window System Programming and Applications
    with Xt OSF/Motif Edition", particularly his dial widget.
    I got some good ideas on presentation from Q. Zhao's
    tetris.
  [Jan 29, 1992]  V2.0: XView version.
  [Mar 19, 1991]  V1.0: SunView version.
