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

01A Snake That Takes the Shortest Breadth-First Path and Chases Its Tail When Boxed In

Each tick runs a breadth-first search to the food, then checks that the tail stays reachable afterwards and discards paths that trap the snake.

Best forAuto-play demos and AI opponent previews

TICK_MSGRID_NSAFE_CHECKREJECT_LIFE
A Snake That Takes the Shortest Breadth-First Path and Chases Its Tail When Boxed In
Open in a new tab

01 A Snake That Takes the Shortest Breadth-First Path and Chases Its Tail When Boxed In — Measured area 49.751% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · CSS Snake Game: 9 Boards That Find Their Own Path

The post this demo lives in

CSS Snake Game: 9 Boards That Find Their Own Path - preview of all 9 demosCSS Snake Game: 9 Boards That Find Their Own PathOpen a css snake game and the snake already turns toward the food before you touch a key — scene 01's shortest path and See all demos in this post

If you like this effect - similar demos