diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index 40e0f1f..963182a 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -83,6 +83,12 @@ public class GamePanel extends JPanel implements Runnable { newPaddle(); newBall(); } + if(score.player_1 == 20){ + score.player_1 = 0; + score.player_2 = 0; + newPaddle(); + newBall(); + } }