Skip to content

Davejadore/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Snake Game

This repository contains a simple implementation of the classic Snake game using HTML, CSS, and JavaScript. The game allows players to control a snake and eat red food to grow while avoiding collisions with the boundaries or the snake itself.

Technologies Used

The game is built using the following technologies:

  • HTML: For the basic structure of the game page.
  • CSS: To style the game elements and layout.
  • Bulma: A modern CSS framework used to style the game title, instructions, and buttons.
  • JavaScript: To implement the game logic and functionality, including handling user input, updating the snake's position, checking for collisions, and displaying a game-over modal.
  • Canvas: The HTML5 Canvas element is used to render the game graphics.

How to Play

  1. Open the "snake.html" file in your web browser.
  2. Read the instructions on the page to understand the game rules.
  3. Click the "Start Game" button to start playing.
  4. Control the snake's direction using the arrow keys (up, down, left, right).
  5. Eat the red food to grow the snake and increase your score.
  6. Avoid hitting the boundaries or the snake itself.
  7. When the game ends, a modal will display the "Game Over" message and your final score.
  8. Click the "Close" button in the modal to close it and start a new game.

Framework Links

Credits

This project was inspired by various Snake game tutorials and examples available online. The JavaScript code for the Snake game was written from scratch based on the basic game mechanics.

License

This project is licensed under the Apache 2.0 License. Feel free to use, modify, and distribute it as you see fit.

Releases

No releases published

Packages

No packages published

Languages