Brick Breaker is a classic arcade game where the player controls a paddle to bounce a ball and break bricks on the screen. The goal is to break all the bricks without letting the ball fall below the paddle.
- Paddle Control: Use the left and right arrow keys to move the paddle.
- Brick Breaking: Break all the bricks to win the game.
- Score Tracking: Earn points for each brick you break.
- Game Over and Win Conditions: The game ends when the ball falls below the paddle or when all bricks are broken.
- Restart Functionality: Press Enter to restart the game after a game over or win.
-
Start the Game:
- Run the
Main
class to start the game. - The ball will start moving automatically once the game begins.
- Run the
-
Control the Paddle:
- Use the right arrow key (
→
) to move the paddle to the right. - Use the left arrow key (
←
) to move the paddle to the left.
- Use the right arrow key (
-
Break the Bricks:
- Bounce the ball off the paddle to hit and break the bricks.
- Each broken brick adds 5 points to your score.
-
Win the Game:
- Break all the bricks to win. A message will appear congratulating you.
- Press Enter to restart the game.
-
Game Over:
- If the ball falls below the paddle, the game is over.
- A message will appear showing your final score.
- Press Enter to restart the game.
Main.java
: The main class that initializes the game window and starts the game.GamePlay.java
: The class that handles game mechanics, rendering, and user input.MapGenerator.java
: The class that generates and manages the brick layout.