diff --git a/src/main/java/PingPong/Paddle.java b/src/main/java/PingPong/Paddle.java index 34cad3f..2338524 100644 --- a/src/main/java/PingPong/Paddle.java +++ b/src/main/java/PingPong/Paddle.java @@ -22,11 +22,19 @@ public class Paddle extends Rectangle { } else if (id == 2) { y2 = y; } - this.width = width; - this.height = height; + PaddleWidth(width); + PaddleHeight(height); this.id = id; } + private void PaddleHeight(int height) { + this.height = height; + } + + private void PaddleWidth(int width) { + this.width = width; + } + public void released(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_W) {