diff --git a/src/main/java/PingPong/Paddle.java b/src/main/java/PingPong/Paddle.java index 5d14044..eb5f8d0 100644 --- a/src/main/java/PingPong/Paddle.java +++ b/src/main/java/PingPong/Paddle.java @@ -56,7 +56,7 @@ public class Paddle extends Rectangle { public void draw(Graphics g) { if (id == 1) { - g.setColor(Color.BLUE); + Paddle2(g); g.fillRect(x, y1, width, height); } else { Paddle1(g); @@ -64,6 +64,10 @@ public class Paddle extends Rectangle { } } + private static void Paddle2(Graphics g) { + g.setColor(Color.BLUE); + } + private static void Paddle1(Graphics g) { g.setColor(Color.YELLOW); }