Skip to content

psupra22/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

A classic Snake game built with Python and Pygame using an object-oriented design. The game includes smooth animations, sprite-based rendering, background music, and a clean modular codebase.

Features

  • Grid-based snake movement with sprite images
  • Apple spawning and consumption logic
  • Score tracking
  • Light/dark green checkerboard background
  • Menu screen and game over screen
  • Restart and quit options
  • Background music loop
  • Clean class-based architecture (Snake, Food, Game, UI)

Installation

  1. Clone this repository:

    git clone https://github.com/psupra22/Snake-Game
    cd Snake-Game
  2. Install dependencies:

    pip install pygame
  3. Make sure the following folders exist and contain the appropriate files:

    • Graphics/: All the .png sprite images for the snake and apple.
    • Sounds/: Background music file (e.g., music.mp3).

Ussage

Run the game:

python main.py

Controls

  • Arrow keys: Move the snake
  • SPACE: Start game from menu
  • R: Restart game after game over
  • ESC: Quit the game

License

This project is licensed under the MIT License.

Contact

For any inquiries, feel free to reach out at [email protected].

About

A classic Snake game built with Python and Pygame using an object-oriented design.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages