anchor.diff:        ActualConsumptionColor := COLOR_YELLOW;
         FinalConsumptionColor := COLOR_YELLOW;
         FractionColor := COLOR_YELLOW;
  -      ExhaustionColor := COLOR_YELLOW;
  -      if (Production > 0) then
  -        ProductionColor := COLOR_GREEN;
  -      if (ActualConsumption > 0) then
  -        ActualConsumptionColor := COLOR_RED;
  -      if (FinalConsumption > 0) then
  -        FinalConsumptionColor := COLOR_RED;
  -      if (Fraction <= 0.1) then
  -        FractionColor := COLOR_GREEN
  -      else
  -        FractionColor := COLOR_RED;
  -      if (Exhaustion > 0) then
  -        ExhaustionColor := COLOR_GREEN
  -      else if (Exhaustion < 0) then
  -        ExhaustionColor := COLOR_RED;
  +      ExhaustionColor := COLOR_RED;
  +      if (Production > 0) then         ProductionColor := COLOR_GREEN;
  +      if (ActualConsumption > 0) then  ActualConsumptionColor := COLOR_RED;
  +      if (FinalConsumption > 0) then   FinalConsumptionColor := COLOR_RED;
  +      if (Fraction <= 0.1) then        FractionColor := COLOR_GREEN
  +      else                             FractionColor := COLOR_RED;
  +      if (Exhaustion > 10) then        ExhaustionColor := COLOR_GREEN
  +      else if (Exhaustion > 1) then    ExhaustionColor := COLOR_YELLOW;
         aBalanceText := aBalanceText + Format(HouseCntColor+'%Dx '+COLOR_WHITE, [Cnt]) //
  -                        + aSpecificText + Format(': ('
  +                        + aSpecificText + Format(':   ('
                           +ProductionColor+'%.2f'+COLOR_WHITE+'; '
                           +ActualConsumptionColor+'%.2f'+COLOR_WHITE+'; '
                           +FinalConsumptionColor+'%.2f'+COLOR_WHITE+'; '
                           +FractionColor+'%.2f '+COLOR_WHITE+'; '
  -                        +ExhaustionColor+'%.2f '+COLOR_WHITE+')|', [Production, ActualConsumption, FinalConsumption, Fraction, Exhaustion]);
  +                        +ExhaustionColor+'%.2f'+COLOR_WHITE+')|', [Production, ActualConsumption, FinalConsumption, Fraction, Exhaustion]);
       end;
     end;
   var
     I: Integer;
  -  //HT: THouseType;
   begin
     aBalanceText := aBalanceText + 'Ware balance|Required houses (ware type ->   production;   actual consumption;   final consumption;   fraction;   exhaustion):|';
  -  //{
     for I := CO_WARE_MIN to CO_WARE_MAX do
       AddWare(CONSUMPTION_ORDER[I], WARE_TO_STRING[ CONSUMPTION_ORDER[I] ]);
     AddWare(wt_Armor, 'Armors');
     AddWare(wt_Axe, 'Weapons');
     AddWare(wt_MetalArmor, 'Iron Armors');
     AddWare(wt_Sword, 'Iron Weapons');
  -  //}
  -  //aBalanceText := aBalanceText + '|Required houses: |';
  -  //I := 0;
  -  //for HT := Low(RequiredHouses) to High(RequiredHouses) do
  -  //  if (RequiredHouses[HT] > 0) then
  -  //  begin
  -  //    I := I + 1;
  -  //    if (I = 5) then
  -  //    begin
  -  //      I := 0;
  -  //      aBalanceText := aBalanceText + '|';
  -  //    end;
  -  //    aBalanceText := aBalanceText + Format('%Dx ', [ RequiredHouses[HT] ]) + HOUSE_TO_STRING[HT] + ';';
  -  //  end;
   end;
   
   
  
positive.code:   I: Integer;
  begin
    fWareBalance[aWT].ActualConsumption := 0;
    fWareBalance[aWT].FinalConsumption := 0;
    for I := Low(CONSUMPTION[aWT]) to High(CONSUMPTION[aWT]) do
      if (CONSUMPTION[aWT,I] <> wt_None) then
      begin
        fWareBalance[aWT].ActualConsumption := fWareBalance[aWT].ActualConsumption + fWareBalance[ CONSUMPTION[aWT,I] ].ActualConsumption * CONSUMPTION_RATIO[aWT,I] * Byte(fCityStats.Houses[ PRODUCTION[ CONSUMPTION[aWT,I] ] ] > 0);
        fWareBalance[aWT].FinalConsumption := fWareBalance[aWT].FinalConsumption + Max(fWareBalance[ CONSUMPTION[aWT,I] ].FinalConsumption, fWareBalance[ CONSUMPTION[aWT,I] ].ActualConsumption) * CONSUMPTION_RATIO[aWT,I];
      end
      else
        break;
  
negative.code: 
  implementation
  uses
    KM_HandsCollection, KM_Hand, KM_Resource, KM_Game, KM_CityPlanner;
  
  
  { TKMCityPredictor }
  constructor TKMCityPredictor.Create(aPlayer: TKMHandIndex; aSetup: TKMHandAISetup);
  begin
    inherited Create;
    fOwner := aPlayer;
    fSetup := aSetup;
  end;
  
  destructor TKMCityPredictor.Destroy();
  