Пример #1
0
  /**
   * Gets the maximum possible production of the given type of goods.
   *
   * @param goodsType The type of goods to check.
   * @return The maximum amount, of the given type of goods, that can be produced in one turn.
   */
  public int getMaximumProduction(GoodsType goodsType) {
    int amount = 0;
    for (Tile workTile : getTile().getSurroundingTiles(getRadius())) {
      if (workTile.getOwningSettlement() == null || workTile.getOwningSettlement() == this) {
        // FIXME: make unitType brave
        amount += workTile.getPotentialProduction(goodsType, null);
      }
    }

    return amount;
  }