예제 #1
0
  public Dungeon getDungeonForLocation(Location loc) {

    String[] keys = getDungeonList();

    for (int i = 0; i < keys.length; i++) {

      String name = keys[i];

      Dungeon dungeon = this.dungeons.get(name);

      if (dungeon == null) {
        continue;
      }

      if (dungeon.containsLocation(loc)) {
        return dungeon;
      }
    }

    return null;
  }
예제 #2
0
  public void addDungeon(Dungeon dungeon) {

    String name = dungeon.getName();
    this.dungeons.put(name, dungeon);
  }