diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index e84d959..40e0f1f 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -78,6 +78,11 @@ public class GamePanel extends JPanel implements Runnable { newBall(); } + if(collisionChecker.didTouchRightEdge(ball.x, FRAME_WIDTH-BALL_DIAMETER)) { + score.player_1++; + newPaddle(); + newBall(); + } }