Skip to content

A classic Snake game where players control a snake that grows longer by eating food while avoiding collisions with walls and itself. Built using Python's turtle graphics library, the game features a scoring system that tracks the player's score and high score, with the ability to reset upon game over.

Notifications You must be signed in to change notification settings

harishrajT/Snake_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

A classic Snake game built using Python's Turtle graphics library. The objective of the game is to control the snake to eat food, grow in length, and avoid colliding with the walls or itself.

Features

  • Snake Movement:

    • Use the arrow keys to control the snake's direction (Up, Down, Left, Right).
  • Food Generation:

    • The snake can eat food to grow longer.
    • The food is randomly placed on the screen.
  • Scoring System:

    • The score increases by one for every food item eaten.
    • The high score is saved in a file.
  • Collision Detection:

    • The game ends when the snake collides with the wall or itself.
  • Reset Functionality:

    • The snake and score reset upon collision.

Requirements

  • Python 3.x
  • Turtle graphics library (pre-installed with Python)

How to Run

  1. Clone the repository or download the code files.
  2. Run the snake_game.py script using Python:
    python snake_game.py

About

A classic Snake game where players control a snake that grows longer by eating food while avoiding collisions with walls and itself. Built using Python's turtle graphics library, the game features a scoring system that tracks the player's score and high score, with the ability to reset upon game over.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages