JanDW / slide-number-puzzle

The 15 puzzle is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The goal of the puzzle is to place the tiles in order by making sliding moves that use the empty space.Note: not all shuffles are currently solvable.
https://jandw.github.io/slide-number-puzzle/
0 stars 0 forks source link

Support different grids (5x5, 6x6,...) #3

Closed JanDW closed 4 years ago

JanDW commented 4 years ago

Started in https://github.com/JanDW/slide-number-puzzle/tree/numeric-grid-areas.

July 15

https://github.com/JanDW/slide-number-puzzle/commit/1716e23d085eb793ce7ed58f97c604fa257c1a30

Could use cleanup, but the visual part works. Couldn't get grid-template-areas to work with numbers (was using letters before). I think it might be unsupported. So I switched to laying out with grid-areas and providing a row / column instead, which was successful.

Need to still work on the interaction, which requires areaKeys to be generated. It's currently hardcoded to suite a 4 by 4 grid.

JanDW commented 4 years ago

Merged into master in #7