Exemplo n.º 1
0
 public static boolean gameIsWon() {
   Level level = getCurrentLevel();
   Room room = level.getCurrentRoom();
   return room.getName().equals("exit");
 }
Exemplo n.º 2
0
 public static boolean gameIsLost() {
   Level level = getCurrentLevel();
   Room room = level.getCurrentRoom();
   return room.getName().equals("trap") || hero.isDead();
 }