https://github.com/realtristan/pygame.snake
Cool Snake Game built with Python and the PyGame Library
https://github.com/realtristan/pygame.snake
game pygame python snake
Last synced: 4 months ago
JSON representation
Cool Snake Game built with Python and the PyGame Library
- Host: GitHub
- URL: https://github.com/realtristan/pygame.snake
- Owner: realTristan
- License: mit
- Created: 2022-12-16T15:18:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-19T04:33:36.000Z (over 2 years ago)
- Last Synced: 2025-03-13T09:19:40.444Z (7 months ago)
- Topics: game, pygame, python, snake
- Language: Python
- Homepage: https://realtristan.github.io/pygame.snake/
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pygame.snake
pygame.snake is a snake game built with python using the pygame library. Upon pygame.snake's first launch, a menu displaying the game title, a play button, and a quit button is drawn to the window. If the player decides to click the "Quit" button, the game is quickly shut down. Although, if the player decides to click the "Play" button, a maze of cubes is drawn to the screen. The green cube, the snake, is interactable through the keys: ```W: Move Up``` ```A: Move Left``` ```S: Move Down``` and ```D: Move Right```Seen within the images exhibited below are fifteen purple blocks, each distributed across the screen. These purple blocks act as obstacles that the player must maneuver. If the player (the snake) hits one of these obstacles, the snake's position is reset, along with the player's current score. If the player's current score is greater than zero, a ```Highscore``` will be saved into a variable whose value can be seen located on the window title. To see your current score, also located on the window title, is the ```Score``` header.
To increase your current score, you need to hit the red blocks located on your screen. These red blocks act as food for the snake. When the snake hits one of these red blocks, his body size is increased, with the increment being displayed at the snake's tail. (A block is added to the end of the snake)
Apart from hitting the random purple blocks (obstacles) displayed on the screen, hitting the outer bounds of the window (500x500) will also cause the snake and its components to reset.

