Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void run() {
- for(;;) {
- if(leftScore == 3 || rightScore == 3) {
- gameStarted = false;
- }
- if(gameStarted) {
- p1.move();
- p2.move();
- b1.move();
- b1.checkPaddleCollision(p1, p2);
- }
- repaint();
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement