Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 879 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 879 Bytes

Snake Game

A simple implementation of the classic Snake game using HTML, CSS, and JavaScript. The player controls a snake that moves around the board, eating food to grow longer while avoiding collisions with itself and the walls.

Features

  • Snake Movement: Control the snake using the arrow keys or WASD.
  • Food Collection: Eat food to grow the snake and increase your score.
  • Game Over Handling: The game ends if the snake collides with itself or the walls, turning the board red for 2 seconds before resetting.
  • Responsive Design: The game is designed to work on both desktop and mobile devices.

Getting Started

Prerequisites

  • A web browser (Chrome, Firefox, etc.)
  • A code editor (optional, for modifications)

Installation

  1. Clone the repository or download the files.
  2. Open index.html in your web browser.

File Structure