Updated code to match the code in Making Games with Python & Pygame book