Skip to content

capt-amlan-padhi/Python-Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README.md


Python Snake Game

Welcome to the Python Snake Game repository. This game is a classic implementation of the popular Snake game, built in Python with the use of the turtle graphics module.

Game Files

This repository contains the following python files:

  1. main.py: This is the entry point of the game. It integrates all other modules and runs the game.

  2. snake.py: This file contains the Snake class which is responsible for creating the snake, controlling its movement, and handling the growth of the snake when it consumes food.

  3. food.py: This file contains the Food class, responsible for the creation and random placement of food items on the game screen.

  4. scoreboard.py: This file contains the Scoreboard class, responsible for displaying and updating the game score.

How to Play

  • Clone this repository to your local machine.
  • Navigate to the directory of the game.
  • Run python main.py to start the game.
  • Use the arrow keys to control the movement of the snake.
  • The aim is to eat as much food as possible. Each time the snake eats food, it grows longer and the score increases.
  • The game ends if the snake touches the game boundary or its own body.

Prerequisites

  • This game requires Python 3. Python can be downloaded from here.
  • The game uses the turtle module for graphics, which comes pre-installed with Python.

Contributing

  • Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
  • Please make sure to update tests as appropriate.

License


Your enjoyment is our priority. Happy gaming!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages