diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index 384db1b..e84d959 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -71,6 +71,13 @@ public class GamePanel extends JPanel implements Runnable { paddle_2.y2 = 0; if (paddle_2.y2 >= (FRAME_HEIGHT-PADDLE_HEIGHT)) paddle_2.y2 = FRAME_HEIGHT-PADDLE_HEIGHT; + + if(collisionChecker.didTouchLeftEdge(ball.x)) { + score.player_2++; + newPaddle(); + newBall(); + + } }