Version of the classic Snake game using PyGame.
To setup:
virtualenv -p python3 .venv
source .venv/bin/activate
pip install -r requirmements.txt
To run:
python snake.py
- Move with WASD or 🔼
◀️ 🔽▶️ - Pause the game with the spacebar
- Adjust the game speed with 1-9
- Let the game play itself in cheat mode with
c
There are a few different options that the computer can use in cheat mode:
Activated with r
. This tells the computer to always use a completely random move.
Activated with p
. This tells the computer to follow a path to hit every location.
Activated with t
. This scores each move based on the chance of survival of the move along with some incentive to move closer to the food.