Implement parts of a Snakes clone using the Pygame graphical game development library.
- practice using the Pygame library
- practice using an event loop to make action happen
1. Install the project dependencies
Install Pygame. On Linux, you can use your package manager to install the
python-pygame package. On Windows and OSX, you can download the appropriate binary from http://www.pygame.org/download.shtml.
2. Download and un-archive the Snakes project skeleton code
Un-archiving will produce a
Snakes folder containing several Python files.
3. Test your setup
snakes.py script in your
Snakes directory. A window with a Snakes game should pop up, including square bits of food, the snake you can control, and the enemy snake. Try using the Up and Down keys to move your snake.