Skip to content

codebadal/snakeGame-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

A simple Snake Game implemented in HTML, CSS, and JavaScript.

Features

  • Play Snake with keyboard arrow keys or on-screen controls.
  • Three difficulty levels: Easy, Medium, and Hard.
  • Score tracking with a High Score display.
  • Sound effects for eating and game over.

Game Controls

Keyboard Controls

  • Arrow Up: Move Up
  • Arrow Down: Move Down
  • Arrow Right: Move Right
  • Arrow Left: Move Left
  • Enter: Restart the game after Game Over

On-screen Controls

  • Use the on-screen controls to change the snake's direction.

Difficulty Levels

Choose the difficulty level to adjust the snake's speed:

  • Easy: Slow speed
  • Medium: Moderate speed
  • Hard: Fast speed

How to Play

  1. Open the index.html file in your web browser.
  2. Choose the difficulty level using the buttons.
  3. Control the snake using the keyboard or on-screen controls.
  4. Eat the food to grow the snake and increase your score.
  5. Avoid collisions with the walls and the snake's body.
  6. Press Enter to restart the game after Game Over.

Sound Effects

  • Game Over sound: 'gameover.mp3'
  • Eating sound: 'eating.mp3'

Demo

Check out the live demo here.

Contributing

Feel free to contribute by opening issues or submitting pull requests. Bug reports and feature requests are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published