Section 7UFO Escape! Your First Complete Game!

Displaying Game Instructions to a Player 81Keeping Score and Displaying It to the Players 82Method Main() for Our Game 84Setting Up the Game Screen 86Starting the UFO Each Game Round 86Move the UFO and Check for Scoring 88Making Your UFO Bounce Off the Paddle 90Game Over! 94

OK, ready for the big time now? You're about to run your own complete game! The program is getting large now—it has more than 140 instructions!—so, remember that if you don't want to type all of these instructions into Phrogram, you can visit the Phrogram Web site and download the example from there.

Before we show you the code, Figure 7.1 is a screenshot of what the game looks like when it is running. This is a two-player game! ...

Get Learn to Program with Phrogram™!: A Guide to Learning Through Game Programming Using the Latest Version of Kids Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.