Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Snake Game (Python Turtle)

A classic Snake Game built using Python's turtle graphics library.
This project demonstrates object-oriented programming, collision detection, event handling, and file I/O for high score tracking.


๐ŸŽฎ Features

  • Snake movement controlled with arrow keys
  • Randomly generated food with different shapes and colors
  • Scoreboard with persistent high score (stored in data.txt)
  • Collision detection with walls and snakeโ€™s own tail
  • Modular code split across multiple files (snake.py, food.py, scoreboard.py, main.py)

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ main.py # Game loop and screen setup โ”œโ”€โ”€ snake.py # Snake class (movement, growth, reset) โ”œโ”€โ”€ food.py # Food class (random position, shape, color) โ”œโ”€โ”€ scoreboard.py # Score tracking and high score persistence โ”œโ”€โ”€ data.txt # Stores high score


๐Ÿ›  Future Improvements Add levels with increasing speed

Introduce obstacles for more challenge

Add sound effects for gameplay feedback

Create a start menu and game-over screen


About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages