Пример #1
0
 /** @return gets the production of the territory */
 @Override
 protected int getProduction(final Territory territory) {
   // Can be null!
   final TerritoryAttachment ta = TerritoryAttachment.get(territory);
   if (ta != null) {
     return ta.getProduction();
   }
   return 0;
 }
Пример #2
0
 @Override
 public double getValue(final PlayerID player, final GameData data) {
   int rVal = 0;
   for (final Territory place : data.getMap().getTerritories()) {
     final TerritoryAttachment ta = TerritoryAttachment.get(place);
     /*
      * Match will Check if terr is a Land Convoy Route and check ownership of neighboring Sea Zone, and also check if
      * territory is
      * contested
      */
     if (ta != null
         && player != null
         && player.equals(place.getOwner())
         && Matches.territoryCanCollectIncomeFrom(player, data).match(place)) {
       rVal += ta.getProduction();
     }
   }
   rVal *= Properties.getPU_Multiplier(data);
   return rVal;
 }