diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index fb3af78..47662f6 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/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) { diff --git a/target/classes/PingPong/Score.class b/target/classes/PingPong/Score.class index 015b82e..727ad84 100644 Binary files a/target/classes/PingPong/Score.class and b/target/classes/PingPong/Score.class differ