Skip to content

Shivam-hits/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game in JavaScript

This is a simple snake game developed using JavaScript, HTML and CSS.

How to Play

  • Use the arrow keys on your keyboard to move the snake.
  • The objective of the game is to eat as many fruits as possible to grow the snake.
  • The game ends when the snake hits the wall or itself.
  • You can restart the game by clicking on the "Restart" button.

How to Run

  • Download or clone the repository to your local machine.
  • Open the index.html file in your web browser.

Game Implementation

  • The game is implemented using HTML5 canvas element.
  • The snake and fruits are drawn on the canvas using JavaScript.
  • The game logic is also implemented using JavaScript.

Game Controls

The game can be played using the following arrow keys on your keyboard:

  • Up Arrow: Move the snake up.
  • Down Arrow: Move the snake down.
  • Left Arrow: Move the snake left.
  • Right Arrow: Move the snake right.

Game Features

The game has a score counter that keeps track of the number of fruits eaten. The game has a restart button that allows the player to restart once the game gets over.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published