!Puzzle 1.04 (17 Apr 2002)
=======

Puzzle displays a sliding block puzzle for you to solve.
Initially you will presented with a fifteen-tile puzzle, but
you can increase the puzzle's size if you wish (see below). To
move the tiles, click on a tile which is in the same row or
column as the blank square: the tile(s) will be moved towards
the blank. Move the tiles until they are in order from left to
right, top to bottom, like so:

               1  2  3  4
               5  6  7  8
               9 10 11 12
              13 14 15

To create a new (random) layout, click Menu over the puzzle
window and choose the 'New board' option. If you want a
tougher challenge, move the pointer to the right from this
menu item to reveal the 'Board size' window, where you can
increase the size of the puzzle.

The appearance of the puzzle may be customised by choosing the
'View' option from the puzzle window's menu. You may choose
the font to be used for the numbers on the puzzle tiles, the
font size, and the colours of the numbers and tiles. Puzzle is
set up initially to display a chequered effect when solved by
the use of alternating tile colours, but if you find this
distracting, or wish to alter the colour scheme, edit the
colours to taste by using the 'View options' window.

Choosing 'Save choices' from Puzzle's icon bar menu will
record your choice of board size and display settings to disc;
they will be restored automatically when you load Puzzle again
in future.

The rest of this document describes how to solve the puzzle,
so only read on if you get really stuck!

Solution
--------

Any puzzle of this form (a square grid of any size with one
blank tile missing) can be solved by arranging the outer ring
of tiles correctly, then arranging the next ring of tiles and
so on:

First:

              1  2  3  4
              5  ?  ?  8
              9  ?  ? 12
             13 14 11 15

Then arrange the three tiles in the middle:

              1  2  3  4
              5  6  7  8
              9 10    12
             13 14 11 15

Then shift the blank to the bottom right (move 11 up and then
15 to the left).

The blank must end up in the bottom right position, but it is
needed while solving the inner rings. The initial layout of
each outer ring therefore takes one tile from an inner ring
(the bottom right tile in that ring in the final arrangement)
and positions it temporarily one square downwards. Finally,
when the inner ring has been solved, the blank must be
positioned at the bottom right of the inner ring:

                 T  T
                 T  B

(B is the Blank, T is the appropriate Tile for that position).
Then, the tile below the blank is moved up, the one to the
right of the new blank position moved to the left, and so on
until the blank is in the bottom right.

Notice that, if the puzzle has an odd number of tiles along
each side, the inner ring will have only one tile. The
solution described in this document deals with this by solving
the two innermost rings (nine tiles) specially; see below.

To solve each ring, get the corners into position first.
Remember that that bottom right corner needs to be the tile
which will be one position to the left in the final
arrangment. With the fifteen-tile puzzle:

              1  ?  ?  4
              ?  ?  ?  ?
              ?  ?  ?  ?
             13  ?  ? 15

Now solve each of the sides. Remember that the tile to the
left of the bottom right corner comes from the ring of tiles
inside the one you are currently solving.

To solve a single side, start at one end (it doesn't matter
which) and shift tiles into the correct places until you get
to the last-but-one tile. Put this tile in the position of the
last tile, and put the last tile to the inside of this one,
ensuring that the blank is still inside the ring which you are
completing. Notice that, for the fifteen-tile puzzle, the
last-but-one tile is the first one, so you must start at this
step:

              1  T  2  4
              T  ?  3  T
              T  ?  ?  T
             13  T  T 15

? is any tile or blank; T is any tile, but not the blank. Now
move the tile in the last-but-one position out (put the blank
at this position), then move the tile at the last position
into the last-but-one (2) and move the last tile into position
(3).

Repeat this for each side.

When you get to the innermost ring with a puzzle with an even
number of tiles along each edge, you should find that, when
the blank is at the bottom right corner, the other tiles are
in the correct place; if not, someone has tampered with the
puzzle (by taking it apart) and rearranged the tiles! It is
impossible to solve the puzzle in this case.

The RISC OS Puzzle will not do this, unless someone has
tampered with the program!

If the puzzle has an odd number of tiles along each edge, you
will eventually get to a position where you only have nine
tiles left to do (the two innermost rings). Solve these by
solving the left and top edges first.

First get the top leftmost tile into position, then the two
remaining tiles along the top: position the middle tile at
the right, the rightmost tile below it, then move the blank to
the middle position, move the middle tile into place and then
the top rightmost tile. Now position the two remaining tiles
on the left edge in the same way. At this point you will have
three tiles and the blank left to position: move the blank
around until all three tiles are in the correct positions.
