sliding-puzzle
sliding-puzzle copied to clipboard
:game_die::cat: A ReactJS sliding puzzle with a solver and cat GIFs as your rewards.
sliding-puzzle
A ReactJS sliding puzzle with a solver and cat GIFs as your rewards.
Live demo
http://cedricblondeau.github.io/sliding-puzzle/
Solver algorithm
The application uses A* search algorithm with Manhattan distance heuristic to solve puzzles. The algorithm solves 3x3 puzzles and some simple 4x4 puzzles but is unsuitable for more complex 4x4 ones.
See app/js/models/solver.js.
To solve 4x4 puzzles, Iterative_deepening_A* and a heuristic such as pattern database could be used.
Development
Install dependencies
npm install
Serve with Browsersync
gulp serve
CLI usage
node app/js/bin/console.js
Build
npm install
gulp build