Skip to content

Snake Game is a single-player game where the snake gets bigger by eating the food and tries to save itself from the boundary of the rectangle and if the snake eats their own body the game will be over. Here, I've built a Snake Game using HTML, CSS, and JavaScript.

Notifications You must be signed in to change notification settings

shrutisingh26/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game Using HTML, CSS and JavaScript

Snake Game is a single-player game where the snake gets bigger by eating the food and tries to save itself from the boundary of the rectangle and if the snake eats their own body the game will be over. Every time the snake eats the food, the score is incremented by one.

Here, I've built a Snake Game using HTML, CSS, and JavaScript.

Game Rules:

  • The movement of the snake is navigated using the arrow keys.
  • If the snake goes out of the boundary or eats its own body the game will be over.

Approach:

I've created three files:

  • An HTML file
  • A CSS file and
  • A JavaScript File

Styling is given in the CSS file and functionality in the JavaScript part. Movement and food will be created in a JavaScript file.

About

Snake Game is a single-player game where the snake gets bigger by eating the food and tries to save itself from the boundary of the rectangle and if the snake eats their own body the game will be over. Here, I've built a Snake Game using HTML, CSS, and JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published