This application is a simple swap puzzle game. In this game an image is cut into a number of square pieces of the same size. Pieces are placed in a random order. The objective of the game is to swap the messed up puzzle pieces to restore the primary picture. You can read more on the wiki page about this puzzle.
Installing Swap Puzzle
Download the file Puzzle_english.zip. Create a folder (directory) "Puzzle" or something similar which fits your needs. Open the file "Puzzle_english.zip" and go into the folder (directory) "Puzzle_en". Copy the folder (directory) "resources" to the new created folder (directory). Next copy the file "Puzzle.jar" to the new created folder (directory). All the other stuff is for building your own program or is not for our operating system. That's it!
The used puzzle.cmd file
Swap Puzzle works with Open JDK in OS/2-eCS. I have made a "puzzle.cmd" file with the following contents;
@echo off set BEGINLIBPATH=[drive: java]\JAVA160ga5\bin set path=[drive: java]\JAVA160ga5\bin set CLASSPATH= [drive: swap puzzle] cd [drive: swap puzzle]\puzzle java -Duser.home=[drive: swap puzzle]\puzzle -jar puzzle.jar 2>puzzle-bugs.txtI use 2 separate folders (directories), one for Java and one for Swap Puzzle with the files created by this program. The references used in the cmd file;
should be replaced by real drive letters. Adjust the file from the distribution below, ie. different drive and directories. Save "puzzle.cmd" and copy it to the "puzzle" folder (directory).
Create a new program object. Specify the path and file name: "[drive: swap puzzle]\puzzle\puzzle.cmd". In the tabpage Session check the boxes "OS/2 window", "Running as an icon" and "Close Window to end program". In the tabpage General you can enter the name "Swap Puzzle". The download also has an OS/2 icon.
Parameters / options explained
11 pictures or more?
It is possible to extend the range of pictures. See the wiki page. If you want more than 10 pictures you have to add new pictures in the folder (directory) "puzzle\resources\jpg". Next you have to edit the file "difficulties.txt" in "puzzle\resources". It depends what you specify in this file, but if you have more then 10 pictures you get "photo11" and so on. In that case you also have to make empty files in "puzzle\resources\moveRecords" and "puzzle\resources\timeRecords". The files you have to make are named like "photo11_3x3.txt" where "_3x3.txt" represents the number of tiles you choose in the file "difficulties.txt". If the new added line is like this "photo11:3x3:4x5:5x6:8x6:9x7:9x9" as an example, then you have to make 6 text files with the chosen puzzle formats. If you don't have these files you get an error and no scores are saved. This is not in the Wiki. I have used 800x600 pictures without a problem. The mouse does work, but need sometimes some more clicks, this is due to differences in Java brands.
As you can see with the above picture from my computer, with a difficult picture you get a difficult puzzle.
In the file you can find the above command file (all drive letters are on set to C:) and an OS/2 Swap Puzzle icon: swap_puzzle-ecs.zip.
revision June 11, 2017