🌍 Public
Viewing a saved revision (read-only)
0578a5f63e9a4f258af23479fe55523f
Snake Game
A classic Snake game rendered on an HTML5 Canvas, where a white snake moves continuously across a dark grid, controlled by arrow keys. Each time the snake consumes a randomly placed teal fruit, its score increments and its tail grows. The animation runs via `window.setInterval`, clearing and redrawing the canvas every 250 milliseconds using Canvas 2D API methods like `fillRect` and `clearRect`, with keyboard input handled through a `keydown` event listener.
AI-generated description