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.
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.
- Open the "snake.html" file in your web browser.
- Read the instructions on the page to understand the game rules.
- Click the "Start Game" button to start playing.
- Control the snake's direction using the arrow keys (up, down, left, right).
- Eat the red food to grow the snake and increase your score.
- Avoid hitting the boundaries or the snake itself.
- When the game ends, a modal will display the "Game Over" message and your final score.
- Click the "Close" button in the modal to close it and start a new game.
- Bulma CSS: https://bulma.io/
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.
This project is licensed under the Apache 2.0 License. Feel free to use, modify, and distribute it as you see fit.