Skip to content

hackademy-es-internals/webinar-snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

This is a basic snake game developed using HTML(HTML5 Canvas), CSS and JavaScript. It can run on desktop devices and laptops.

Getting started

Clone repository from git

Use the command line interface for cloning.

git clone https://github.com/dev-catalyst/snake-game.git

What's inside?

The cloned folder contains the following files:

  • snake.html
  • snake.css
  • snake.js
  • images folder

How to run the game?

Double-click on the snake.html file to open it in the browser.

  1. To play, click on the "Start Game?" button.
  2. Use the arrow keys to move the snake in other directions.
  3. Use the spacebar key to pause or resume the game.
  4. The score and length of the snake increases when it eats the fruit (apple) in the playing area.
  5. The game finishes when the snake touches the boundary, it's own tail or the virus in the playing area.

How to edit code?

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published