anchor.diff:    // Split a shape of the future mine into segments with different density of resource (less coal in edges and more in center tiles)
     function CalculateCountOfResources(const Resource: Byte; const Quantity: Integer; var count: array of Integer): TInteger2Array;
     var
  -    i,j,cntRes,difference, incJ, incPerATile: Integer;
  +    I,K,cntRes,difference, incK, incPerATile: Integer;
       Output: TInteger2Array;
     begin
       SetLength(Output, 4, 5); // 4 types of resources, 5 quantity types (none, 1, 2, 3, 4)
  
positive.code:     const
        POINTS_PER_A_LOC = 5;
    begin
      SetLength(Points, POINTS_PER_A_LOC*Length(Locs));
      SetLength(Used, Length(Points));
      SetLength(Distances, Length(Points), Length(Points));
  
negative.code:     X_RESERVE := (maxX - minX) / (MineCnt*1.0) - MinMineSize;
      X := minX;
      X_FLOAT := MinX;
      MaxPosIdx := 0;
      startIndex := 0;
      while (X+MinMineSize <= MaxX) do
      begin
        minVal := High(Integer);
  