Browse Source

update

main
fdai4616 2 years ago
parent
commit
875b7a4ef4
  1. 6
      src/main/java/PingPong/GamePanel.java

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

@ -11,8 +11,14 @@ public class GamePanel extends JPanel implements Runnable {
static final int PADDLE_HEIGHT = 100; static final int PADDLE_HEIGHT = 100;
public static final Dimension SCREEN = new Dimension(FRAME_WIDTH, FRAME_HEIGHT); public static final Dimension SCREEN = new Dimension(FRAME_WIDTH, FRAME_HEIGHT);
Ball ball;
public void run() { public void run() {
}
public void newBall() {
ball = new Ball((FRAME_WIDTH/2)-(BALL_DIAMETER/2), ((FRAME_HEIGHT/2)-(BALL_DIAMETER/2)), BALL_DIAMETER, BALL_DIAMETER);
} }
} }
Loading…
Cancel
Save