Skip to content

pavlovskakristina/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake-Game

🐍 Snake Game

A simple classic Snake game written in Python using the turtle module.
You control the snake, collect food, and try not to collide with walls or yourself.
Each time you eat, your snake gets longer and your score increases!


🚀 Features

  • Smooth movement using arrow keys
  • Snake grows after eating food
  • Random food placement
  • Collision detection (walls, self)
  • Scoreboard with live updates
  • Clean object-oriented design using Python classes

📁 Project Structure

Snake-Game/

├── main.py # Main game loop
├── snake.py # Snake class and movement logic
├── food.py # Food appearance and placement
└── score_board.py # Scoreboard display and logic


🎮 How to Play

  1. Run the game with:
python main.py
  1. Control the snake using arrow keys: ↑ Up ↓ Down ← Left → Right
  2. Eat food to gain points.
  3. Avoid hitting the walls or yourself.
  4. The game ends when a collision occurs.

🛠️ Requirements

Python 3.x No external libraries required (uses built-in turtle module)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages