anchor.diff:  end;
   
   
  -function TKMResourceDat.IsValid: boolean;
  +function TKMResourceDat.IsValid: Boolean;
   begin
     Result := fType in [WARE_MIN..WARE_MAX];
   end;
  
positive.code: end;
  
  
  function TKMResourceDat.GetTitle: string;
  begin
    if IsValid then
      Result := fTextLibrary[TX_RESOURCES_NAMES__27 + ResourceTypeToIndex[fType]]
  
negative.code: 
  { TKMResourceCollection }
  constructor TKMResourceCollection.Create;
  var I: TResourceType;
  begin
    inherited;
  
    for I := Low(TResourceType) to High(TResourceType) do
      fList[I] := TKMResourceDat.Create(I);
  
    //Calcuate the trade costs for marketplace once
    CalculateCostsTable;
  end;
  
  
  destructor TKMResourceCollection.Destroy;
  var I: TResourceType;
  begin
    for I := Low(TResourceType) to High(TResourceType) do
      fList[I].Free;
  
    inherited;
  end;
  
  
  //Export costs table for analysis in human-friendly form
  procedure TKMResourceCollection.ExportCostsTable(const aFilename: string);
  var
    SL: TStringList;
    I: TResourceType;
  begin
    SL := TStringList.Create;
    try
      for I := WARE_MIN to WARE_MAX do
        SL.Add(fList[I].GetTitle + #9 + #9 + FloatToStr(fList[I].fMarketPrice));
  
      SL.SaveToFile(aFilename);
    finally
      SL.Free;
    end;
  end;
  
  
  