Skip to content

RockurDev/the_snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

This is a classic Snake game implemented in Python using the Pygame library. The goal of the game is to navigate the snake, eat food, and grow as long as possible without running into the rock or the snake's own body.

Features

  • Classic snake gameplay
  • Increasing difficulty as the snake grows
  • Simple and clean graphics

Requirements

  • Python 3.9.12
  • Pygame library (version specified in requirements.txt) You can install the required Pygame version using pip and the requirements.txt file: pip install -r requirements.txt

How to Run

  1. Clone the repository:
    git clone https://github.com/RockurDev/the_snake.git 
    cd the_snake
    
  2. Run the game:
    python the_snake.py
    

Controls:

Arrow Keys: Move the snake (Up, Down, Left, Right)

Code Structure

  • the_snake.py: The main script that runs the game also contains configurable settings for the game.
  • requierments.txt: Contains necessary libraries.
  • setup.cfg: Configuration file for packaging and distribution.
  • pytest.ini: Configuration file for pytest.

Customization

You can customize various aspects of the game by modifying the the_snale.py file:

  • Screen size: Change the width and height of the game window.
  • Colors: Modify the colors of the snake, food, and background.
  • Speed: Adjust the speed of the snake.

Future Improvements

  • Adding different levels or maps
  • Implementing power-ups
  • Adding sound effects and music
  • Creating a multiplayer mode

Contributing

Contributions are welcome! Feel free to submit a pull request or open an issue to discuss potential changes or improvements.

Acknowledgements

  • Pygame library documentation and tutorials
  • Classic Snake game inspiration

Enjoy the game and have fun coding!

About

The snake game written with PyGame

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages