anchor.diff:  //	for Y1 := 1 to gTerrain.MapY-1 do
   //  begin
   //    Y0 := Y1 - 1;
  -////    Y2 := Y1 + 1;
  +//    Y2 := Y1 + 1;
   //    Y := Y1 shl 1;
   //		for X1 := 1 to gTerrain.MapX-1 do
   //    begin
   //      X0 := X1 - 1;
  -////      X2 := X1 + 1;
  +//      X2 := X1 + 1;
   //      X := X1 shl 1;
   //
   //    // Detect 8 surrounding tiles and store ideal transition of each tile into BArr
  
positive.code: // aTiles = empty TKMTerrainTileBriefArray
  procedure TKMRandomMapGenerator.GenerateMap(var aTiles: TKMTerrainTileBriefArray);
  var
    Y, X, K: Integer;
    A,TileTemplateArr: TKMByte2Array;
    S: TInteger2Array;
    TilesPartsArr: TTileParts;
  
    //Queue: TKMQuickFlood;
  
    Locs: TKMPointArray;
  
  
  
negative.code: 
    // Make obstacles
    Factor := gTerrain.MapX * gTerrain.MapY * RMGSettings.Obstacle.Density / 10000;
    ObstacleSeeds := RNDPointsInGrid(Round(Factor), 0, KMPoint( Low(P[0]), Low(P) ), KMPoint( High(P[0]), High(P) ));
    FillObstacle := TKMFillBiome.Create( KMPoint(  Low(A[0]), Low(A) ), KMPoint( High(A[0]), High(A) ), aVoronoi, A);
    try
      for I := Low(ObstacleSeeds) to High(ObstacleSeeds) do
  