anchor.diff:    fRNG := TKMRandomNumberGenerator.Create;
     fRes := TKMBalancedResources.Create;
   
  -  // Default configuration
     with RMGSettings do
     begin
  +    // Debug configuration
  +    {$IFDEF DEBUG_RMG}
  +    with Locs do
  +    begin
  +      Active := False;
  +      Players := 4;
  +      Layout := 0;
  +      ProtectedRadius := 6;
  +      with Resource do
  +      begin
  +        Active := True;
  +        ConnectLocs := True;
  +        MineFix := True;
  +        Stone := 1000;
  +        Gold := 300;
  +        Iron := 250;
  +      end;
  +    end;
  +    with Obstacle do
  +    begin
  +      Active := True;
  +      Density := 20;
  +      Size := 20;
  +      Variance := 10;
  +      Ratio[otEgold] := 4;
  +      Ratio[otEIron] := 4;
  +      Ratio[otSwamp] := 0;
  +      Ratio[otWetland] := 0;
  +      Ratio[otWater] := 4;
  +    end;
  +    with Walkable do
  +    begin
  +      Active := False;
  +      Grass := True;
  +      Ground := True;
  +      Snow := True;
  +      Sand := True;
  +      FirstLayerStep := 5;
  +      FirstLayerLimit := 6;
  +      SecondLayerStep := 5;
  +      SecondLayerLimit := 6;
  +    end;
  +    with OnePath do
  +    begin
  +      NoGoZones := True;
  +      ReplaceTerrain := True;
  +    end;
  +    with Height do
  +    begin
  +      Active := False;
  +      Step := 4;
  +      Slope := 40;
  +      Height := 10;
  +      HideNonSmoothTransition := True;
  +    end;
  +    with Objects do
  +    begin
  +      Active := False;
  +      ObjectDensity := 6;
  +      ForestDensity := 70;
  +      Trees := 20;
  +      Animals := True;
  +    end;
  +    Seed := 0;
  +    Decomposition := False;
  +    BasicTiles := False;
  +    CA := True;
  +    // Default configuration
  +    {$ELSE}
       with Locs do
       begin
         Active := True;
  
positive.code:     begin
        X := X1 shl 1;
        // Create mask
        sum := (Byte(B[Y1,X1,1,1] = B[Y1,X1,1,0]) shl 0) OR
               (Byte(B[Y1,X1,1,1] = B[Y1,X1,0,1]) shl 1) OR
               (Byte(B[Y1,X1,1,1] = B[Y1,X1,1,2]) shl 2) OR
               (Byte(B[Y1,X1,1,1] = B[Y1,X1,2,1]) shl 3);
  
        case sum of
        // 1 side is equal
  
negative.code:         Active := True;
          ConnectLocs := True;
          MineFix := True;
          Stone := 1200;
          Gold := 350;
          Iron := 300;
        end;
  