Queue the next turn: a tiny Snake game in vanilla canvas JS

2026-10-15来源 dev.to JavaScriptEnglish
Queue the next turn: a tiny Snake game in vanilla canvas JS

I wanted a snake game for GHW and here's what cursor did for me withing 5 min. Cursor is fast, gives great results and kind of COOL I assume.

Snake

Browser Snake game. Move with arrow keys or WASD, eat food, and avoid walls and your own tail.

Play

Open index.html in a browser, or from this folder run:

python -m http.server 8080

Then visit http://localhost:8080

Controls

  • Arrows or WASD: move
  • Space: pause / resume
  • Enter: restart after game over



原文:https://www.a8q9.cn/en/article/queue-the-next-turn-a-tiny-snake-game-in-vanilla-canvas-js-119788.html

相关文章