Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 766 Bytes

README.md

File metadata and controls

16 lines (12 loc) · 766 Bytes

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.