575859606162636465
} } public boolean removeAlly(Nation nation) throws NotRegisteredException { if (!hasAlly(nation)) throw new NotRegisteredException(); else return getAllies().remove(nation); }
919293949596979899
} public boolean removeEnemy(Nation nation) throws NotRegisteredException { if (!hasEnemy(nation)) throw new NotRegisteredException(); else return getEnemies().remove(nation); }
161162163164165166167168169
getAssistants().add(resident); } public void removeAssistant(Resident resident) throws NotRegisteredException { if (!hasAssistant(resident)) throw new NotRegisteredException(); else assistants.remove(resident); }
240241242243244245246247248249250
return numResidents; } public void removeTown(Town town) throws EmptyNationException, NotRegisteredException { if (!hasTown(town)) throw new NotRegisteredException(); else { boolean isCapital = town.isCapital(); remove(town);
293031323334353637
townBlocks.add(townBlock); } public void removeTownBlock(TownBlock townBlock) throws NotRegisteredException { if (!hasTownBlock(townBlock)) throw new NotRegisteredException(); else townBlocks.remove(townBlock); }
4243444546474849
} } public Town getTown() throws NotRegisteredException { if (!hasTown()) throw new NotRegisteredException(); return town; }
6667686970717273
} } public Resident getResident() throws NotRegisteredException { if (!hasResident()) throw new NotRegisteredException(); return resident; }
949596979899100101102
} public TownBlock getTownBlock(Coord coord) throws NotRegisteredException { TownBlock townBlock = townBlocks.get(coord); if (townBlock == null) throw new NotRegisteredException(); else return townBlock; }
132133134135136137138139140141142
return townBlocks.values(); } public void removeTown(Town town) throws NotRegisteredException { if (!hasTown(town)) throw new NotRegisteredException(); else { towns.remove(town); /* try { town.setWorld(null);
858687888990919293
try { resident = universe.getResidentMap().get(universe.checkAndFilterName(name).toLowerCase()); } catch (InvalidNameException e) { } if (resident == null) throw new NotRegisteredException(String.format("The resident '%s' is not registered.", name)); return resident; }