SamarthTech / web-projects-2024

This is the Official Repository of SAMARTH for Open-Odyssey 1.0. Contribute your Web Development or Applications in our Repository 🔥. Make Quality Contributions 😎
MIT License
65 stars 61 forks source link

Added Snake Game #51 #63

Closed vidhigoyal619 closed 5 hours ago

vidhigoyal619 commented 9 hours ago
  1. Game Controls: Arrow keys to control the direction of the snake.
  2. Food Generation: Randomly generated food positions for the snake to eat.
  3. Score Tracking: Real-time score displayed on the screen, along with a high-score feature using localStorage.
  4. Game Over Condition: The game ends if the snake collides with the walls or itself.
  5. Responsive Design: The game is responsive and adjusts well to different screen sizes.

    Files Added:

  6. index.html: Sets up the game’s structure.
  7. style.css: Styles the game board, snake, and food.
  8. script.js: Contains the game logic.