1
0
Fork 0

minor fixes

This commit is contained in:
rxbn_ 2019-12-31 15:21:40 +01:00
parent 2870a5fc9a
commit 669c37029a
2 changed files with 3 additions and 3 deletions

View File

@ -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 // 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 //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 // top paddle
reflectionPoint.setY(reflectionPoint.getY() - Constants.REFLECTION_OFFSET); reflectionPoint.setY(reflectionPoint.getY() - Constants.REFLECTION_OFFSET);
} else { } else {
@ -237,6 +237,6 @@ public class Ball implements IBall {
// replace direction vector // replace direction vector
this.direction.setDx(reflectionVector.getDx()); this.direction.setDx(reflectionVector.getDx());
this.direction.setDy(reflectionVector.getDy()); this.direction.setDy(reflectionVector.getDy());
} }
} }

View File

@ -119,7 +119,7 @@ public class Stone implements IStone {
switch(type) { switch(type) {
// multi-case, hacky, but dont care // multi-case, hacky, but dont care
case 0: case 0:
// naah, isnt a stone // nah, isn't a stone
default: default:
// default case, not in range // default case, not in range
// setting to not a stone // setting to not a stone