Skip to content

samarthgule-wq/snake-game-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

Classic Snake: grid movement, growing snake, food spawn, score, game-over, restart.

Run

  • npm install
  • npm run dev
  • Open the printed URL (default http://localhost:5173)

Pages

  • Menu (landing): / (public/index.html)
  • Game: /game.html (public/game.html)
  • Advanced (canvas): /advanced/ (public/advanced/index.html)

Controls (Game)

  • Move: Arrow keys or WASD
  • Pause/Resume: Space (or the Pause button)
  • Restart: R (or the Restart button)

Tests

  • npm test

About

A simple Snake Game built using JavaScript (ES Modules), HTML, and CSS. The project uses HTML5 Canvas to render the game and separates game logic, rendering, and input into different files for better structure. It also includes a small Node.js server and test scripts to run and manage the project easily.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors