Browse Source

update

main
fdai4616 2 years ago
parent
commit
aaf0897e83
  1. 5
      src/main/java/PingPong/GamePanel.java

5
src/main/java/PingPong/GamePanel.java

@ -78,6 +78,11 @@ public class GamePanel extends JPanel implements Runnable {
newBall(); newBall();
} }
if(collisionChecker.didTouchRightEdge(ball.x, FRAME_WIDTH-BALL_DIAMETER)) {
score.player_1++;
newPaddle();
newBall();
}
} }

Loading…
Cancel
Save