Let’s create the 15-puzzle with JavaScript!
Clone the app and run it with:
yarn
webpack-dev-server
- The HTML skeleton of this puzzle is a table forming a grid of tiles
- You’ll may want to use the JavaScript properties
cellIndex
androwIndex
to find tiles position in the grid - Once you are done with your version, you can check another possible solution here