Executable ·· play.0002
Snake
score 0 length 3 level 1
←↑↓→orWASDmoveSpacestartPpauseRreset
The whole thing is one class and a setInterval. The grid sizes itself to the canvas rather than being fixed, so it fills whatever space it’s given, and the tick interval drops by 10ms every 50 points until it bottoms out at 80ms.
The only state that outlives the page is a top-ten score list in localStorage, which is validated on read. If something else has written garbage to that key, it starts over rather than throwing.