Skip to content

A simple and classic Snake Game built using HTML, CSS, and vanilla JavaScript. Use the arrow keys to control the snake, eat food to grow longer, and avoid hitting the walls or yourself.

Notifications You must be signed in to change notification settings

SMXTREME/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Snake Game

A classic Snake Game built with HTML, CSS, and JavaScript — no libraries, no frameworks, just pure front-end fun!

Snake Gameplay Preview


🎮 How to Play

  • Use Arrow Keys to move the snake:
    • ⬆️ Up
    • ⬇️ Down
    • ⬅️ Left
    • ➡️ Right
  • Eat the red circle (food/apple) to grow.
  • Avoid hitting the walls or your own tail.
  • Game ends when the snake collides with a wall or itself.

🛠️ Features

  • Pure JavaScript (no libraries)
  • Clean UI using CSS
  • Simple logic for movement, food spawn, and collision

📂 File Structure

.
├── index.html         # Main HTML file
├── style.css          # CSS styles for the game
├── script.js          # JavaScript game logic
├── preview.png        # Screenshot/preview image
├── favcion.png        # Favicon image
└── README.md          # Project documentation

🚀 Run the Game

Just open index.html in any modern browser. No setup required!


About

A simple and classic Snake Game built using HTML, CSS, and vanilla JavaScript. Use the arrow keys to control the snake, eat food to grow longer, and avoid hitting the walls or yourself.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published