From 193121ef52721b41a8008775fd46b02f701f87d5 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 7 Feb 2023 23:12:54 +0100 Subject: [PATCH] update --- src/main/java/PingPong/GamePanel.java | 4 ++++ src/main/java/PingPong/Paddle.java | 3 +++ 2 files changed, 7 insertions(+) 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) { + } }