Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. if (currentStage.hasWon()) // this stage win
  2. {
  3. this.rows++;
  4. this.cols++;
  5. this.nextStage();
  6. } else if (currentStage.hasLose()) // this stage lose
  7. {
  8. this.lives--;
  9. int round = 0;
  10. while (round < 5) {
  11. currentStage.robotSummonAnimationFrame();
  12. Thread.sleep(100);
  13. round++;
  14. }
  15. this.remove(currentStage);
  16. this.rows--;
  17. this.cols--;
  18. if (lives > 0)
  19. this.nextStage(); // if there is still another stage
  20. } else if (!currentStage.isTimeUp()) {
  21. currentStage.timeRunning();
  22. }
  23. if (lives < 0) {
  24. this.gameOver();
  25. }
  26. this.repaint();
  27. Thread.sleep(100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement