diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index 8a128f7..639d25a 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -56,6 +56,10 @@ public class GamePanel extends JPanel implements Runnable { paddle_2.pressed(e); } } + public void keyReleased(KeyEvent e) { + paddle_1.released(e); + paddle_2.released(e); + } diff --git a/src/main/java/PingPong/Paddle.java b/src/main/java/PingPong/Paddle.java index 5613614..8818b4e 100644 --- a/src/main/java/PingPong/Paddle.java +++ b/src/main/java/PingPong/Paddle.java @@ -9,4 +9,7 @@ public class Paddle { public void pressed(KeyEvent e) { } + + public void released(KeyEvent e) { + } }