This is a basic snake game developed using HTML(HTML5 Canvas), CSS and JavaScript. It can run on desktop devices and laptops.
Clone repository from git
Use the command line interface for cloning.
git clone https://github.com/dev-catalyst/snake-game.git
The cloned folder contains the following files:
- snake.html
- snake.css
- snake.js
- images folder
Double-click on the snake.html file to open it in the browser.
- To play, click on the "Start Game?" button.
- Use the arrow keys to move the snake in other directions.
- Use the spacebar key to pause or resume the game.
- The score and length of the snake increases when it eats the fruit (apple) in the playing area.
- The game finishes when the snake touches the boundary, it's own tail or the virus in the playing area.
Open the folder in Visual Studio Code or any other code editor and make changes as needed, save the changes and run the snake.html file again.