simple snake game using pygame module in Python.
Make sure you have the pygame module along with Python. If not, use the package manager pip to install.
bash pip install pygame
also do download the .ttf file given along and keep it in the same folder as the python file.
The snake is a list which can be controlled using the arrow keys and appears as a black box. The food circles are blue. Each time the snake eats a food circle, its speed increases by increasing the framerate. If the snake hits the boundary, you have lost the game and final score will be printed with the option to replay or quit. The game also has additional features:
*It can be played in full-screen mode
*Bonus food circles which appear purple which increases score by 15. These food circles may dissappear if not taken fast.
Run the game by simply executing the python file(make sure the font file is in the same directory).
bash python snakeProject.py
Jessica Jolly UwU
I'm just a beginner in programming, so I know there are better ways to implement some of these features. If you know an easier and more efficient way to do so, do let me know!