Module TilePuzzle

module TilePuzzle: sig .. end
The sliding tile puzzle implementation of Solver.PUZZLE

type state 
a sliding tile state
type move = 
| N (*North*)
| S (*South*)
| E (*East*)
| W (*West*)
each move slides the blank space in the corresponding direction
type tile = int 
include Solver.PUZZLE
include Animation.PUZZLE
val of_list : int -> tile list -> state
Given a size n and a list l of size (n*n), creates a sliding tile puzzle. The tiles of l are placed from left to right, then from top to bottom. 0 represents the blank tile.

Example: of_list 2 [0; 3; 1; 2] creates the board

    +------+
    |    3 |
    | 1  2 |
    +------+