Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (stillAlive) {
- if (level < 11) {
- level++;
- JOptionPane.showMessageDialog(myPanel, "Congratulations - You've reached Level " + level + "!");
- } else {
- JOptionPane.showMessageDialog(myPanel,
- "Congratulations - You won the Game!!!\n" + "After " + iteration
- + " steps you have reached the maximum \n" + "snake length by eating "
- + FOOD_ITEM_GOAL + " items.");
- }
- } else {
- JOptionPane.showMessageDialog(myPanel,
- "Ouch - that hurt :-(\n" + "You stayed alive for " + iteration + " steps\n" + "and have eaten "
- + foodEaten + " itmes during that time.\n" + "T R Y A G A I N !!!");
- level = 1;
- }
- initFullSnakeGamePanel();
- myPanel.repaint();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement