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