Browse Source

Update

main
Justin Senn 2 years ago
parent
commit
fe9e3df7cb
  1. 7
      src/main/java/PingPong/GamePanel.java
  2. BIN
      target/classes/PingPong/GamePanel$AL.class
  3. BIN
      target/classes/PingPong/GamePanel.class

7
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);
}
}

BIN
target/classes/PingPong/GamePanel$AL.class

BIN
target/classes/PingPong/GamePanel.class

Loading…
Cancel
Save