Snakes Pygame: Difference between revisions

Content added Content deleted
imported>Jesstess
imported>Jesstess
Line 50: Line 50:
=== 4. Handle quit and restart key presses ===
=== 4. Handle quit and restart key presses ===


I want to keep playing! So far, there's no way to quit or restart the game (besides closing the window).
I want to keep playing! So far, there's no way to quit (besides closing the window) or restart the game.


Fix this by completing the "3 key presses" TODO in the <code>restart</code> function in <code>snakes.py</code>.
Fix this by completing the "3 key presses" TODO in the <code>restart</code> function in <code>snakes.py</code>.

Test your changes by re-running the game, running into the bad snake to end the game, and making sure you can restart.