Skip to content

Aman0307/Snake_Game_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Snake_Game_Python

A simple Snake game implemented in Python using the Pygame library.

Prerequisites

Python 3
Pygame

Running the game

Clone the repository: git clone https://github.com/Aman0307/Snake_Game_Python.git
Navigate to the project directory: cd REPO_NAME
Install the required dependencies: pip install -r requirements.txt
Run the game: python snake.py

Controls

Use the arrow keys to control the snake's movement

Scoring

The player's score increases by 1 points for each apple the snake eats and also the length of snake increases by 1 unit.

Game Over

The game ends if the snake collides with the walls of the screen or with itself.
The final score is displayed on the screen before the game quits.
The user can restart the game by pressing ENTER or quit the game by pressing ESC.

Customization

The screen size, snake speed, and block size can be adjusted by modifying the corresponding variables in the snake.py file.
The snake and food images can be replaced by placing new image files in the project directory and updating the file names in the snake.py file.

image

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages