← Back to context

Comment by smalltorch

6 hours ago

Hmm, that's fun and useful. Here is snake game for 60 minutes.

https://drop-e7e6d363-601.important-seat.workers.dev

Your code appears to have a bug where if the arrow keys trigger a change of direction twice in a single frame interval, it can mistakenly send the snake back on itself.