Hardware Reference
In-Depth Information
7. The last two if statements are the most important ones. These check whether the
ball has gone behind either of the paddles. If it has, it awards a point to the other
paddle, and moves the ball back into the middle of the stage. The game then con-
You now have the beginning of your Ping Pong game! Where can you go from here? Here
are a few ideas:
• Add a background that represents a tennis match.
• Have the game end when one side scores enough points.
• Have the computer play as one of the paddles.
The rest is up to you! Have fun and experiment!
Search WWH ::

Custom Search