In order to run this game, you need to install pygame. You can do this by running the following command in your terminal:
pip install pygame
Once you have installed pygame, you can run the game by running the following command in your terminal:
python3 pygame-1.py
The goal of the game is to eat as many apples as possible. The snake is controlled by the arrow keys. If the snake eats the red cube, it will grow longer. If the snake crashes into itself or the wall, then the game is over.
- Press the arrow keys to move the snake
- Press the escape or n key to quit the game
- Press the enter y to restart the game
- You can press y and n at any given time to quit or restart the game
- The snake will move faster as it grows longer (is not quite working yet)