This program plays the vintage pong-like video game "breakout." It displays walls of bricks on the screen, a moving ball, and a paddle. When the ball hits a brick, the brick disappears while the ball bounces off. This program demonstrates the use of an array to keep track of a variable number of objects.
Click below to download the source files for Breakout.