public Castle convertCityToCastle(Position pos, Location loc) {
return convertCityToCastle(pos, loc, false);
}
private Castle convertCityToCastle(Position pos, Location loc, boolean loadFromSnaphot) {
Castle castle1 = replaceCityWithCastle(getBoard().get(pos), loc);
Castle castle2 = replaceCityWithCastle(getBoard().get(pos.add(loc)), loc.rev());
castle1.getEdges()[0] = castle2;
castle2.getEdges()[0] = castle1;
if (!loadFromSnaphot) {
newCastles.add(castle1.getMaster());
}
game.post(new CastleDeployedEvent(game.getActivePlayer(), castle1, castle2));
return castle1.getMaster();