anchor.diff:    OBST_Probability[otEIron] := 1;
   
   // Make obstacles
  -  Factor := gTerrain.MapX * gTerrain.MapY * RMGSettings.Obstacle.Density / 5000;
  +  Factor := fMapX * fMapY * RMGSettings.Obstacle.Density / 5000;
     MinP := KMPoint(Low(P[0]), Low(P));
     MaxP := KMPoint(High(P[0]), High(P));
     ObstacleSeeds := RNDPointsInGrid(Max(1,Round(Factor)), 0, MinP, MaxP);
  
positive.code:       A[Y+1,X+1] := Byte(btDark);
      end;
    end;
    SetLength(Visited,gTerrain.MapY,gTerrain.MapX);
    for i := Low(Visited) to High(Visited) do
      for j := Low(Visited[I]) to High(Visited[I]) do
        Visited[i,j] := False;
  
negative.code:     X,aX,X0,X1,X2,Y,aY,Y0,Y1,Y2,i,idxX,idxY,move,price: Integer;
      History: TInteger2Array;
  begin
    SetLength(Result, fMapY+1, fMapX+1);
    SetLength(History, fMapY+1, fMapX+1);
    SetLength(Points, RoundUP((fMapY-1) / (Step*1.0)), RoundUP((fMapX-1) / (Step*1.0)));
    for Y := Low(Result) to High(Result) do
      for X := Low(Result[Y]) to High(Result[Y]) do
      begin
  