From ce770c9cc7a655eaa161b41a26b597f2da37ebd1 Mon Sep 17 00:00:00 2001 From: rxbn_ Date: Sun, 15 Dec 2019 07:27:18 +0100 Subject: [PATCH] fix - Ball - reflectOnPaddle - wrong estimation and therefore no bottom paddle behaviour --- src/break_out/model/Ball.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/break_out/model/Ball.java b/src/break_out/model/Ball.java index d48751b..f6860c4 100644 --- a/src/break_out/model/Ball.java +++ b/src/break_out/model/Ball.java @@ -214,7 +214,7 @@ public class Ball implements IBall { // only two paddles defined in the game design, therefore greater or smaller than middle of screen //deciding if the paddle is at the top or bottom to adjust if its +or- y direction - if (paddle.getPosition().getY() <= Constants.SCREEN_HEIGHT) { + if (paddle.getPosition().getY() <= Constants.SCREEN_HEIGHT/2) { // top paddle reflectionPoint.setY(reflectionPoint.getY() - Constants.REFLECTION_OFFSET); } else {