Complete overhaul of Application & ApplicationFrame so that game can end
This commit is contained in:
@ -58,6 +58,28 @@ public class Game {
|
||||
}
|
||||
|
||||
public void stopGame(GameoverCause cause) {
|
||||
switch (cause){
|
||||
|
||||
case TIMEOUT:
|
||||
JOptionPane.showMessageDialog(null, "Time is up! Anubis has enslaved the world by now.",
|
||||
"Game over",
|
||||
JOptionPane.INFORMATION_MESSAGE,
|
||||
new ImageIcon("Anubis.png"));
|
||||
Application.frameInstance.backToMapSelection();
|
||||
break;
|
||||
case ONEILLWON:
|
||||
JOptionPane.showMessageDialog(null, "Colonel O'Neill won!", "Game over",
|
||||
JOptionPane.INFORMATION_MESSAGE,
|
||||
new ImageIcon("Deal_with_iit.png"));
|
||||
Application.frameInstance.backToMapSelection();
|
||||
break;
|
||||
case JAFFAWON:
|
||||
JOptionPane.showMessageDialog(null, "Jaffa won!", "Game over",
|
||||
JOptionPane.INFORMATION_MESSAGE,
|
||||
new ImageIcon("Deal_with_iit.png"));
|
||||
Application.frameInstance.backToMapSelection();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void moveONeill(Direction direction) {
|
||||
|
Reference in New Issue
Block a user