A simple Snake game built with HTML Canvas and vanilla JavaScript.
- Open
index.htmlin a browser, or - Use a local server (recommended for consistent asset loading). For example, VS Code “Live Server”.
- Desktop: Arrow keys to move.
- Mobile / Touch: Swipe on the game area (canvas) to change direction.
- Start / Restart: Click the game area when prompted.
index.html— page + canvassrc/styles.css— basic stylingsrc/snakeGame.js— game logic and input handlingassets/audio/*— audio assets