This is implementation of 15-puzzle (see: http://en.wikipedia.org/wiki/15_puzzle) in JavaScript