From 0774a431392b782a5f03d2241c04e1c47103658c Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Wed, 8 Feb 2023 20:50:21 +0100 Subject: [PATCH] update --- src/main/java/PingPong/GamePanel.java | 7 +++++++ 1 file changed, 7 insertions(+) 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(); + + } }