public Location getRepairLocation() {
        final Player player = getOwner();
        final Tile tile = getTile();
        Location bestLocation = player.getEurope();
        int bestTurns = (bestLocation == null) ? INFINITY
            : getTurnsToReach(bestLocation);
        for (Colony colony : player.getColonies()) {
            int turns;
            if (colony != null && colony != tile.getColony()
                && colony.hasAbility("model.ability.repairUnits")
                && (turns = getTurnsToReach(colony)) >= 0
                && turns < bestTurns) {
                // Tile.getDistanceTo(Tile) doesn't care about
                // connectivity, so we need to check for an available
                // path to target colony instead
                bestTurns = turns;
                bestLocation = colony;
            }
        }
        return bestLocation;
    }