GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

04Shuffling by Walking Away From the Finished Board

Starting from the finished board the blank is moved to a neighbor SHUFFLE_STEPS (60) times. A move straight back to the cell it just came from is skipped and which neighbor to take is picked by an integer hash. A board walked out by the rules passes the 02 check as solvable every time, and the same seed gives the same board.

Best forA way to shuffle that guarantees the board is solvable

SHUFFLE_STEPShashnoBacktrack
Shuffling by Walking Away From the Finished Board
Open in a new tab

04 Shuffling by Walking Away From the Finished Board — Measured area 27.604% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · Sliding Puzzle: 9 Canvas Scenes, Parity to Search

The post this demo lives in

Sliding Puzzle: 9 Canvas Scenes, Parity to Search - preview of all 9 demosSliding Puzzle: 9 Canvas Scenes, Parity to SearchWhy are some sliding puzzle boards unsolvable? 02 counts flipped pairs to sort them, 05 raises a Manhattan distance boun See all demos in this post

If you like this effect - similar demos