From b4e47dc1c61a659d557a949f5b4e3ce9258a2aa3 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 7 Feb 2023 23:50:45 +0100 Subject: [PATCH] refactoring: --- src/main/java/PingPong/Paddle.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/PingPong/Paddle.java b/src/main/java/PingPong/Paddle.java index 878807c..5d14044 100644 --- a/src/main/java/PingPong/Paddle.java +++ b/src/main/java/PingPong/Paddle.java @@ -59,8 +59,12 @@ public class Paddle extends Rectangle { g.setColor(Color.BLUE); g.fillRect(x, y1, width, height); } else { - g.setColor(Color.YELLOW); + Paddle1(g); g.fillRect(x, y2, width, height); } } + + private static void Paddle1(Graphics g) { + g.setColor(Color.YELLOW); + } }