CLASS CREATION #6
Tuesday, November 13
Today you will make a few
modifications to our clickit.py
program, which will make the game a bit more
challenging. I've listed four
possibilities below—implement at least two of
them in your current version of the game to
complete this class creation. You are
welcome to incorporate more than two changes,
of course! You can also suggest a change
of your own; just be sure to clear it with Dr.
V before you begin coding.
- Enlarge the screen to 600 by 600 pixels,
and also double the number of circles on the
screen to begin. The latter is
relatively quick to do, but changing the
screen size will require you to adjust
numbers here and there throughout your
program.
- Make the circles smaller, say only 10 or
15 pixels in radius. Or for more of a
challenge, choose the radius of each circle
randomly!
- Include an option at the start of the game
in which the user selects the pace of the
circles: either leisurely, moderate,
cookin', or lightning. Set a variable
delay
accordingly, and modify the pygame.time.delay
commands to use this value.
- After ten seconds, abruptly reverse the
directions of all the circles. You
will need to initialize a variable reversed = "no",
and then include a statement to check
whether a reversal has happened and whether
pygame.time.get_ticks()
has exceeded 10000 yet. If so, go
through and modify dx
and dy
for each circle.
|
|