A classic retro-style snake game built with HTML, CSS, and JavaScript. Navigate the snake using arrow keys, eat the food to grow longer, and try not to hit the walls or your own tail. Press the Spacebar to start a new game! 🎮
- Game Controls: Arrow keys to control the snake’s direction. ⬆️⬇️⬅️➡️
- Scorekeeping: Keeps track of the current score and high score. 🏆
- Game Speed: The snake moves faster as you eat more food. 🐍💨
- Game Reset: Automatically resets the game when a collision occurs (either with the walls or the snake’s body). 💥
- HTML: Structure of the web page and game board.
- CSS: Styling of the game, including the layout and visuals (game borders, snake, food).
- JavaScript: Game logic, including movement, collision detection, score updating, and speed adjustment.
- Clone this repository or download the files to your local machine.
- Open
index.htmlin your browser. - Press Spacebar to start the game. ⏳
- Use the arrow keys (Up, Down, Left, Right) to move the snake. ⬆️⬇️⬅️➡️
- Try to eat the food (the snake grows longer). 🍏
- Avoid hitting the walls or your own snake's body. 🚧
- Your score is displayed at the top of the screen. The high score is saved for each session. 📊
index.html: The main HTML file that structures the game and includes all necessary elements.style.css: The CSS file responsible for the layout and styling of the game board, snake, and food.script.js: The JavaScript file that controls the game logic, movement, scoring, and interactions.snake-logo.png: Image for the game logo displayed at the start screen.
- Add sound effects for actions like eating food and colliding. 🎧
- Implement different difficulty levels. ⚙️
- Add a start screen with more game instructions. 📝
