@ -39,6 +39,10 @@ public class GamePanel extends JPanel implements Runnable {
}
public void checkCollision() {
//Reflection of Ball when it touches top and bottom edges!
if(collisionChecker.didTouchTopOrBottomEdge(ball.y, FRAME_HEIGHT-BALL_DIAMETER)) {
ball.setYDirection(-ball.yVelocity);