Skip to content

jeetrico/snake_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

JEET BANERJEE's Snake Game

Screenshot

A simple Snake game implemented in HTML and JavaScript. Control the snake using the arrow keys and try to eat the red apple to grow. The game resets if the snake collides with itself.

Features

  • Canvas-based Rendering: Uses HTML5 <canvas> to render the game graphics.
  • Snake Movement: Move the snake with arrow keys. The snake wraps around the screen edges.
  • Apple Eating: Eat the apple to grow the snake.
  • Collision Detection: The game resets if the snake collides with itself.

How to Run

  1. Clone the Repository:

    git clone https://github.com/jeetrico/snake_game.git
  2. Navigate to the Project Directory:

    cd snake_game
  3. Open SNAKE_GAME.HTML in a Web Browser: You can open SNAKE_GAME.HTML directly in a web browser to start playing the game.

Code Explanation

  • HTML: Defines the structure of the game with a <canvas> element.
  • CSS: Styles the page and centers the canvas.
  • JavaScript: Contains the game logic, including movement, collision detection, and rendering.

Contributing

Feel free to fork the repository, make changes, and submit pull requests. Contributions and improvements are welcome!

About

ALL ABOUT MY NEW HTML GAME PROJECT.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages