diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index d9e8dc6..13f574c 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -4,6 +4,7 @@ import javax.swing.*; import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; +import java.util.Random; public class GamePanel extends JPanel implements Runnable { @@ -14,7 +15,7 @@ public class GamePanel extends JPanel implements Runnable { static final int PADDLE_HEIGHT = 100; public static final Dimension SCREEN = new Dimension(FRAME_WIDTH, FRAME_HEIGHT); - + Random random; Ball ball; Paddle paddle_1; Paddle paddle_2; @@ -154,12 +155,12 @@ public class GamePanel extends JPanel implements Runnable { paddle_1.pressed(e); paddle_2.pressed(e); } - } - public void keyReleased(KeyEvent e) { - paddle_1.released(e); - paddle_2.released(e); - } + public void keyReleased(KeyEvent e) { + paddle_1.released(e); + paddle_2.released(e); + } + } diff --git a/target/classes/PingPong/GamePanel$AL.class b/target/classes/PingPong/GamePanel$AL.class index 38e42d2..1cb4ecc 100644 Binary files a/target/classes/PingPong/GamePanel$AL.class and b/target/classes/PingPong/GamePanel$AL.class differ diff --git a/target/classes/PingPong/GamePanel.class b/target/classes/PingPong/GamePanel.class index 5dd0342..c989c25 100644 Binary files a/target/classes/PingPong/GamePanel.class and b/target/classes/PingPong/GamePanel.class differ