Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. if (stillAlive) {
  2.                 if (level < 11) {
  3.                     level++;
  4.                     JOptionPane.showMessageDialog(myPanel, "Congratulations - You've reached Level " + level + "!");
  5.                 } else {
  6.                     JOptionPane.showMessageDialog(myPanel,
  7.                             "Congratulations - You won the Game!!!\n" + "After " + iteration
  8.                                     + " steps you have reached the maximum \n" + "snake length by eating "
  9.                                     + FOOD_ITEM_GOAL + " items.");
  10.                 }
  11.             } else {
  12.                 JOptionPane.showMessageDialog(myPanel,
  13.                         "Ouch - that hurt :-(\n" + "You stayed alive for " + iteration + " steps\n" + "and have eaten "
  14.                                 + foodEaten + " itmes during that time.\n" + "T R Y    A G A I N   !!!");
  15.                 level = 1;
  16.             }
  17.             initFullSnakeGamePanel();
  18.             myPanel.repaint();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement