# Yorkville High School Computer Science

ASSIGNMENTS: No Current Assignments

## Computer Programming I :: Projects :: Pong

Rubric
Lesson
Example
Due: May 24

### Problem

You are to create a Pong game. If you don't know how to play Pong check out the example. Make sure you go through the lesson first to set up this project. You can go here to play a tribute to the original Pong. This project is required for students in Honors Computer Programming I, but optional for other students.

### Specific Requirements

1. Make sure your collision detection works well and the paddles can't get stuck. You may need to create a stuckPaddle method to prevent the paddles from sticking in the top and bottom walls.
2. Make sure the ball moves in a random direction when the game starts and after every goal.
3. A goal method should be used to check for the ball passing a paddle.
4. Allow the game to end before the ball is moving by letting the user press a button.
5. When the game ends it should say who won or if it was a tie.
6. Determine a good name for each variable following the rules.
7. Rename the form and all controls on the form.
8. Add color, font styles, and at least one picture to make your program look nice.
9. Make sure your code is commented and there is appropriate white space.

### Project Extension

1. Have the ball change color based upon the paddle that hit it last. You can look at the example to see what this will look like.
2. Have the speed and angle of the ball change based on where it hits the paddle. For example, if the ball hits close to the edge of the paddle it will speed up and leave at a sharper angle. If the ball hits close to the middle of the paddle it will slow down and move at something close to a 45ยบ angle.
3. Create power-ups that appear randomly while the game is being played. If the ball hits a power-up it somehow affects the game. For example, you could have a power-up that increases/decreases the paddle size, increases/decreases the speed of the paddle, or increases/decreases the speed of the ball.