From 669c37029a11c15ca6c5aa23d00e07e7a4691e23 Mon Sep 17 00:00:00 2001 From: rxbn_ Date: Tue, 31 Dec 2019 15:21:40 +0100 Subject: [PATCH] minor fixes --- src/break_out/model/Ball.java | 4 ++-- src/break_out/model/Stone.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/break_out/model/Ball.java b/src/break_out/model/Ball.java index f6860c4..fc65d48 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/2) { + if (paddle.getPosition().getY() <= Constants.SCREEN_HEIGHT/2.0) { // top paddle reflectionPoint.setY(reflectionPoint.getY() - Constants.REFLECTION_OFFSET); } else { @@ -237,6 +237,6 @@ public class Ball implements IBall { // replace direction vector this.direction.setDx(reflectionVector.getDx()); this.direction.setDy(reflectionVector.getDy()); - } + } } diff --git a/src/break_out/model/Stone.java b/src/break_out/model/Stone.java index 11c7348..5871eb4 100644 --- a/src/break_out/model/Stone.java +++ b/src/break_out/model/Stone.java @@ -119,7 +119,7 @@ public class Stone implements IStone { switch(type) { // multi-case, hacky, but dont care case 0: - // naah, isnt a stone + // nah, isn't a stone default: // default case, not in range // setting to not a stone