Skip to content

fewgets/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Classic Snake Game โ€” Built with Python & Pygame

A simple and addictive Snake Game developed in Python using the Pygame library. ๐Ÿ•น๏ธ


๐ŸŽฎ Game Overview

Navigate the green snake, eat the red food blocks, and grow longer with every bite! Avoid crashing into the walls or yourself โ€” or itโ€™s game over.

This project demonstrates the use of:

  • Keyboard input handling
  • Dynamic object rendering
  • Collision detection
  • Game loop mechanics
  • Score tracking

๐Ÿงฐ Tech Stack

Component Used
Language Python 3.x
Library Pygame
Interface Pygame Window

๐Ÿ“ฆ Requirements

Before running the game, make sure to install dependencies:

pip install pygame

๐Ÿš€ How to Run

python snake_game.py

(Replace snake_game.py with your actual filename)


๐ŸŽฎ Controls

Key Action
โฌ…๏ธ Left Move Left
โžก๏ธ Right Move Right
โฌ†๏ธ Up Move Up
โฌ‡๏ธ Down Move Down
Q Quit on Game Over
C Restart Game

โœจ Features

  • Real-time score display
  • Auto-growing snake
  • Randomized food spawning
  • Game over and replay functionality

๐Ÿง Concept Highlights

  • Game loop using while with event handling
  • Snake represented by a dynamic list of coordinates
  • Collision detection against wall and self
  • Score shown with custom fonts
  • Restart logic using recursion

๐Ÿ“ฉ Contact

๐Ÿ‘ค Usama Shaikh ๐Ÿ“ง Email: shaikhusama541@gmail.com ๐Ÿ”— GitHub: @fewgets

Feel free to reach out for:

  • ๐Ÿ”“ Training code
  • ๐Ÿงช Data processing pipeline
  • ๐Ÿค Collaboration
  • ๐Ÿ’ฌ Guidance

๐Ÿ“œ License

This project is for academic and research purposes only. Feel free to fork, reference, and learn - but give credit where due ๐Ÿ™


About

Classic Snake Game using Python and Pygame. Eat, grow, and avoid hitting yourself!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages