diff --git a/src/main/java/PingPong/Paddle.java b/src/main/java/PingPong/Paddle.java index 25546ae..878807c 100644 --- a/src/main/java/PingPong/Paddle.java +++ b/src/main/java/PingPong/Paddle.java @@ -23,6 +23,7 @@ public class Paddle extends Rectangle { this.id = id; } + public void pressed(KeyEvent e) { } @@ -53,4 +54,13 @@ public class Paddle extends Rectangle { } } + public void draw(Graphics g) { + if (id == 1) { + g.setColor(Color.BLUE); + g.fillRect(x, y1, width, height); + } else { + g.setColor(Color.YELLOW); + g.fillRect(x, y2, width, height); + } + } }