Home Math Tim's Skiing Sites

## Problem

Restore this octagon with the bottom-right corner missing: Moves are made by sliding an adjacent tile into the position occupied by the blank space (grey). This is yet another variant of the classical 8-Puzzle. It is also known as the sliding-block/tile-puzzle.

Click on the tile you want to move to the blank space. This tile should be adjacent to the blank space either horizontally or vertically.

This implementation is equipped with unique acceleration features. First, if you click on a tile located in the same row or column as the blank space and which is two squares away from the blank space, then both the tile you click on and the tile in between will move toward the blank space. Second, if you click on a tile diagonally adjacent to the blank space and if the blank space is the target position of one of the two tiles neighboring both the blank space and the tile you clicked on, then the tile whose target position is the blank space moves to the blank space and simultaneously the tile you clicked on moves to the position of that tile. These features will help you to move tiles quicker when appropriate.