Skip to content

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

Packages

Contributors

Languages