Skip to content

harisbikovic/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

This is an implementation of the classic Snake game using Python's Turtle module.

snake

Description

The game consists of a player-controlled snake that moves around the screen, trying to eat food pellets that appear at random locations. Each time the snake eats a pellet, it grows longer, making it harder to avoid running into itself. The game ends when the snake collides with itself or with the screen's border.

How to Play

The player uses the arrow keys to move the snake around the screen. The snake will move continuously in the direction it's facing until it hits a wall or a body segment. The objective is to eat as much food as possible without crashing.

Features

  • Snake movement using arrow keys
  • Randomly generated food pellets
  • Snake grows longer as it eats food
  • Score counter that increases with each food pellet eaten
  • Game over screen when the snake collides with itself or the border

Installation

  1. Clone the repository: git clone https://github.com/<username>/snake-game.git
  2. Install the required modules: pip install -r requirements.txt
  3. Run the game: python main.py

About

Snake game written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages