Teach Your Kids To Code: A Parent-friendly Guide to Python Programming

(vip2019) #1

9


User interaction: Get into the Game


In Chapter 8, we used some of the Pygame library’s


features to draw shapes and images on the screen.


We were also able to create animation by drawing


shapes in different locations over time. Unfortunately,


we weren’t able to interact with our animated objects


like we might in a game; we expect to be able to click,


drag, move, hit, or pop objects on the screen to affect


or control the elements of a game while it runs.

Free download pdf