Skip to content

๐ŸŽฎ A classic Snake game built with Python and Tkinter. Eat, grow, and avoid collisions in this simple grid-based arcade game!

Notifications You must be signed in to change notification settings

CodeCourtAce/PythonSnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Python Snake Game

๐Ÿ Python Snake Game
A simple yet fun implementation of the classic Snake game built using Python's tkinter GUI library. Eat the yellow food, grow longer, and try not to crash into the walls or yourself!


๐ŸŽฎ Game Features

  • ๐Ÿงฑ Grid-based movement
  • ๐ŸŽ Randomly spawned food
  • ๐Ÿ Snake grows with every food eaten
  • ๐Ÿ’€ Collision detection with walls and self
  • ๐Ÿ Game over screen
  • โŒจ๏ธ Keyboard arrow controls
  • ๐Ÿงช Written in pure Python with no external dependencies

๐Ÿ›  Requirements

  • Python 3.x (recommended: 3.6+)
  • tkinter (included with most standard Python installs)

โ–ถ๏ธ How to Run

  1. Clone the repository:
    git clone https://github.com/yourusername/PythonSnakeGame.git
    cd PythonSnakeGame
    
# Python Snake Game

๐Ÿ Python Snake Game 
A simple yet fun implementation of the classic Snake game built using Python's tkinter GUI library. Eat the yellow food, grow longer, and try not to crash into the walls or yourself!

---

## ๐ŸŽฎ Game Features
- ๐Ÿงฑ **Grid-based movement**
- ๐ŸŽ **Randomly spawned food**
- ๐Ÿ **Snake grows with every food eaten**
- ๐Ÿ’€ **Collision detection with walls and self**
- ๐Ÿ **Game over screen**
- โŒจ๏ธ **Keyboard arrow controls**
- ๐Ÿงช **Written in pure Python with no external dependencies**

---

## ๐Ÿ›  Requirements
- **Python 3.x** (recommended: 3.6+)
- **tkinter** (included with most standard Python installs)

---

## โ–ถ๏ธ How to Run

1. Clone the repository:
 ```bash
 git clone https://github.com/yourusername/PythonSnakeGame.git
 cd PythonSnakeGame
  1. Run the game:
    python snake_game.py
    Replace snake_game.py with the actual filename if different.

๐ŸŽฏ How to Play

  • Use the arrow keys to move:
    • โฌ†๏ธ Up
    • โฌ‡๏ธ Down
    • โฌ…๏ธ Left
    • โžก๏ธ Right
  • Eat the yellow food to grow longer.
  • Avoid crashing into walls or your own body.
  • The game ends when a collision occurs.
  • Your score is displayed at the top.

๐Ÿ–ผ๏ธ Screenshot

alt text


๐Ÿ“ Project Structure

PythonSnakeGame/
โ”‚
โ”œโ”€โ”€ snake_game.py         # Main game logic and GUI
โ”œโ”€โ”€ README.md             # Project documentation


๐Ÿง  Future Improvements (Ideas)

  • Add difficulty levels (e.g., speed increases over time)
  • Wall wrap mode (snake continues through walls)
  • Sound effects and background music
  • High score tracking and leaderboard
  • Pause and resume functionality

๐Ÿ“„ License

This project is licensed under the MIT License.


๐Ÿ™Œ Credits

Created with ๐Ÿ’š using Python and Tkinter.
Inspired by the classic Nokia Snake game.

About

๐ŸŽฎ A classic Snake game built with Python and Tkinter. Eat, grow, and avoid collisions in this simple grid-based arcade game!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages