Skip to content

bash-Queko/Classic-Python-Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Python Snake Game

Classic Python Snake Game Using pygame [pip install pygame]

Instructions

The snake starts at the center of the board, moving north (upward). The snake moves at a constant speed. The snake moves only north, south, east, or west (ignore the versions of the game where the snake can move in curves). The snake "moves" by adding a square to its head and simultaneously deleting a square from the tip of its tail. "Apples" appear at random locations, and persist for a random amount of time (but usually long enough for it to be possible for the snake to get to the apple). There is always exactly one apple visible at any given time. When the snake "eats" (runs into) an apple, it gets longer. (This is hard to describe, so play a couple of games to see what I mean.) When the snake gets longer, say by n squares, it does so by not deleting squares from its tail for the next n moves. The game continues until the snake "dies". A snake dies by either (1) running into the edge of the board, or (2) by running into its own tail. The final score is based on the number of apples eaten by the snake. The snake can be controlled by the arrow keys. (You can use additional keysets if you like, but use at least these.) There should also be a way to pause/resume the game (usually the "P" key).

License

  • MIT

Author

SJ || bash-Queko@protonmail.com

About

Classic Python Snake Game

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages