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