Puzzle Mastery, CPS 108, Spring 1997
Code for the puzzle mastery is accessible on the acpub system
in ~ola/cps108/java/puzzle, but the most recent code will always
be accessible from the online documentation.
This mastery can be worked on in groups of up to 3. It is
due on April 28, bonus of 20% of turned in by April 21.
This mastery will be graded face-to-face.
Puzzle Functionality
You must add to the existing puzzle code to implement the following
extensions. Implementing these features well, with well-documented
classes and a good design can earn a grade of B/B+.
- A Scramble button and menu choice that allows the user to
randomly shuffle the pieces. The shuffling must lead to a
solvable puzzle.
- A Quit button and menu choice for gracefully exiting the
application.
- A load image button and menu choice that allows the user to
specifiy a gif/jpg to use in the puzzle, the choices should
come from a default directory and only .gif and .jpg
extensions shown (assuming FileDialogFilter works).
Bells and Whistles
Adding any of the following bells and whistles, in addition to the
requirements above, will lead to grades of A-, A, A+.
- User-selectable choice of # of grid elements, so 4 x 4 or 5
x 5 is selectable from menu item (or radio buttons, or
something else). The loaded image should be used.
- The method by which the tiles slide should be interesting
and different (not just swapped). Ideally the user will be
allowed to select from one of several different sliding
methods. See the Strategy pattern for help with this.
- The user should be shown thumbnail sketches of all the
images that might be loaded a la the visual schnauzer
feature of the Unix application xv.
- Implement a solve button
- Anything else cool. Be imaginative.
Owen L. Astrachan
Last modified: Wed Apr 16 13:47:55 EDT