anchor.diff:      Vector.Y := Byte(FinP.Y > StartP.Y) - Byte(FinP.Y < StartP.Y);
       //  Make route to final point or another route
       ActP := StartP;
  -//    Owerflow := 0;
  -    while ( (not Result) AND ((FinP.X <> ActP.X) OR (FinP.Y <> ActP.Y)) ) do
  -    begin
  -//      Owerflow := Owerflow + 1;
  +    Owerflow := 0;
  +    while ( (Owerflow < 500) AND (not Result) AND ((FinP.X <> ActP.X) OR (FinP.Y <> ActP.Y)) ) do
  +    begin
  +      Owerflow := Owerflow + 1;
         // Actualize current point
         if (FinP.X <> ActP.X) then ActP.X := ActP.X + Vector.X;
         if (FinP.Y <> ActP.Y) then ActP.Y := ActP.Y + Vector.Y;
  
positive.code:     end;
    end;
  end;
  
  
  
  
negative.code: // aTiles = empty TKMTerrainTileBriefArray
  procedure TKMRandomMapGenerator.GenerateMap(var aTiles: TKMTerrainTileBriefArray);
  var
    aX,aY,Y, X, K, X0,X1,X2,Y0,Y1,Y2,i: Integer;
    Pmin,Pmax: TKMPoint;
    S1,S2,S3,S4: TInteger2Array;
    A,TileTemplateArr: TKMByte2Array;
    S: TInteger2Array;
    TDAP: TKMPoint2Array;
    P: TKMPointArray;
    Points: TKMPoint2Array;
    Resources: TBalancedResource1Array;
    TilesPartsArr: TTileParts;
  
    //Queue: TKMQuickFlood;
    FillBiome: TKMFillBiome;
  
    LocMin, LocMax: TKMPoint;
    Locs: TKMPointArray;
  
  
  