Based on this video: https://www.youtube.com/watch?v=K9qMm3JbOH0
I made their own classes for the bar and the ball, added randomness to the movement of the ball and made the map to repair its top layer of bricks when seven bricks have been destroyed (and shift down by one layer all the other bricks) to make the game end only if when we miss the ball.
In order to play the game you can just download the BrickBreaker.jar from the releases.