diff --git a/src/main/java/PingPong/Paddle.java b/src/main/java/PingPong/Paddle.java index abe5d60..25546ae 100644 --- a/src/main/java/PingPong/Paddle.java +++ b/src/main/java/PingPong/Paddle.java @@ -32,9 +32,17 @@ public class Paddle extends Rectangle { public void move() { - y1 += yVelocity1; - y2 += yVelocity2; - } + yVol1(); + yVol2(); + } + + private void yVol2() { + y2 += yVelocity2; + } + + private void yVol1() { + y1 += yVelocity1; + } public void setYDirection(int yDirection, int paddleId) {