Skip to content

yusraSyed05/Snake-Game

Repository files navigation

🐍 Snake Game

A modern, fully responsive Snake game built with React and styled with tailwind-css.

React Tailwind CSS Vite License: MIT

🌐 Demo

Visit the live demo: Snake Game

🖼️ Screenshots

Start Screen Gameplay

📦 Installation

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Steps

  1. Clone the repository
git clone https://github.com/yourusername/snake-game.git
  1. Navigate to the project directory
cd snake-game
  1. Install dependencies
npm install
  1. Start the development server
npm run dev

📁 Project Structure

snake-game/
├── public/
├── src/
│   ├── SnakeGame.jsx    
│   ├── App.jsx                              
│   ├── index.css              
│   └── main.jsx                
├── .gitignore
├── LICENSE
├── README.md
├── index.html
├── package.json
├── package-lock.json
├── postcss.config.js
├── tailwind.config.js
└── vite.config.js

🎮 How to Play

  1. Select Starting Level - Choose from levels 1-12 based on your skill
  2. Control the Snake:
    • Desktop: Use arrow keys
    • Mobile: Swipe in desired direction
  3. Eat Food - Collect the glowing pink orbs to grow and score
  4. Avoid Obstacles:
    • Don't hit walls (🧱)
    • Don't collide with yourself
  5. Complete Levels - Reach the target score to advance
  6. Progress - Beat all 12 levels!

🐛 Issues

If you discover any bugs, please report them in the Issues section.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

An interactive browser-based Snake Game with lightweight structure and fun gameplay.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published