A basic breakout game using PyGame.
The program consists of three modules:
- breakout.py - Contains the game loop and runs the game
- ball.py - A class to create, update, and draw the ball
- paddle.py - A class to create, update, and draw the paddle
- Constrain the paddle so that no pixels leave the screen by limiting movement
- Constrain the ball so that no pixels leave the screen by adding reflection
- Detect ball/paddle collisions, reflect ball
- Implement a "round" that ends when a ball touches the bottom of the screen
- Implement a "game" that ends when 3 rounds have ended
- Build a "wall" of "bricks" that includes 5 courses of 10 bricks
- Detect ball/brick collisions, remove brick(s), reflect ball