Skip to content

thomasafroo/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Snake Game

A simple Snake game implemented in Python using Tkinter. Control the snake to collect food, grow in size, and earn points.

Features

  • Interactive Gameplay: Control the snake with arrow keys.
  • Scoring System: Earn points by eating food.
  • Collision Detection: Game ends if the snake hits itself or the boundaries.
  • Dynamic Growth: Snake grows longer after eating food.

Prerequisites

  • Python 3.6 or later (Tkinter included).

How to Run

  1. Clone or download the repository.
  2. Open a terminal and navigate to the project directory.
  3. Run the game with: python snake_game.py

Controls

  • Arrow Keys to move: Up, Down, Left, Right.

Customization

Adjust the following constants in the code:

  • GAME_WIDTH and GAME_HEIGHT: Game window size.
  • SPEED: Game speed (lower value = faster).
  • SNAKE_COLOR and FOOD_COLOR: Colors of snake and food.

Enjoy playing!

About

A snake game built in Python using Tkinter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages