Hardware Reference
In-Depth Information
Your game is very nearly complete! When the player has collected all the diamonds
and battled his way to the end of the arena before the time runs out, the game will
restart on the next level. Here it will get a little bit harder, with more diamonds and
less time. If the player manages to complete all the levels, it's game over, and con-
gratulations!
CHALLENGE
Try adding more levels. You could make the game begin at a more leisurely pace
by giving the first few levels more time and fewer diamonds, increasing the dif-
ficulty gradually to make the later levels really hard.
Adding the.Game Over Message
The very last thing you need to do to complete the game play is to add a message
right at the end of the program, telling the player it's game over and giving him his
final score (see FigureĀ 9-13). Simply add the following code to the very bottom of the
program:
mc.postToChat("Game Over - Points = " + str(points))
FIGURE.9-13 Tell the player when the game is over and then display the score.
 
Search WWH ::




Custom Search