Advertisement
Guest User

Untitled

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