Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🐍 Snake Game – Python Tkinter

A simple Snake Game built using Python and Tkinter. The game uses a grid-based movement system, score tracking, and smooth animation using Tkinter’s after() loop.


✅ Features

  • Classic snake movement
  • Arrow-key controls
  • Food spawns at random grid positions
  • Snake grows when food is eaten
  • Score display
  • Wall and self-collision detection
  • Game Over screen
  • Clean Tkinter GUI with centered window

✅ Technologies Used

  • Python 3.x
  • Tkinter (built-in GUI library)
  • Random module

✅ How to Run

  1. Clone the repository:

    git clone https://github.com/Yusra-Azeem/python-project
  2. Navigate to the project folder:

    cd python-project
  3. Run the game:

    python snake.py

✅ Controls

Key Action
⬅️ Left Arrow Move Left
➡️ Right Arrow Move Right
⬆️ Up Arrow Move Up
⬇️ Down Arrow Move Down

✅ File Structure

snake.py       # Main game file

✅ License

This project is open-source and free to use.

About

A snake game using tkinter

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages