cedricblondeau / sliding-puzzle

:game_die::cat: A ReactJS sliding puzzle with a solver and cat GIFs as your rewards.

Home Page:https://cedricblondeau.github.io/sliding-puzzle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sliding-puzzle

A ReactJS sliding puzzle with a solver and cat GIFs as your rewards.

forthebadge forthebadge

Live demo

https://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

About

:game_die::cat: A ReactJS sliding puzzle with a solver and cat GIFs as your rewards.

https://cedricblondeau.github.io/sliding-puzzle/


Languages

Language:JavaScript 86.1%Language:SCSS 7.0%Language:HTML 7.0%