diff --git a/src/main/java/PingPong/Ball.java b/src/main/java/PingPong/Ball.java index 22a7e65..bbc7809 100644 --- a/src/main/java/PingPong/Ball.java +++ b/src/main/java/PingPong/Ball.java @@ -19,6 +19,10 @@ Random random; xDirect(randomXDirection); int randomYDirection = random.nextInt(2); + yDirect(randomYDirection); + } + + private void yDirect(int randomYDirection) { if (randomYDirection == 0) randomYDirection--; setYDirection(randomYDirection * ballSpeed);