Browse Source

update

main
fdai4616 2 years ago
parent
commit
79ea437ef4
  1. 6
      src/main/java/PingPong/GamePanel.java
  2. BIN
      target/classes/PingPong/Score.class

6
src/main/java/PingPong/GamePanel.java

@ -28,6 +28,7 @@ public class GamePanel extends JPanel implements Runnable {
public void run() {
@ -59,7 +60,10 @@ public class GamePanel extends JPanel implements Runnable {
ball = new Ball((FRAME_WIDTH/2)-(BALL_DIAMETER/2), ((FRAME_HEIGHT/2)-(BALL_DIAMETER/2)), BALL_DIAMETER, BALL_DIAMETER);
}
public void newPeddle() {
paddle_1 = new Paddle(0, (FRAME_HEIGHT/2)-(PADDLE_HEIGHT/2), PADDLE_WIDTH, PADDLE_HEIGHT, 1 );
paddle_2 = new Paddle(FRAME_WIDTH-PADDLE_WIDTH, (FRAME_HEIGHT/2)-(PADDLE_HEIGHT/2), PADDLE_WIDTH, PADDLE_HEIGHT, 2 );
}
public class AL extends KeyAdapter {
public void keyPressed(KeyEvent e) {

BIN
target/classes/PingPong/Score.class

Loading…
Cancel
Save