anchor.diff:        // Note: conditions are for special transitions between iron and gold mountains
           // Left Top Right %0111
           7: begin
  -          if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  -            begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,2,1]; LD := B[Y1,X1,2,1]; end else
  -            begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,2,2]; LD := B[Y1,X1,2,0]; end;
  +          LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,2,1]; LD := B[Y1,X1,2,1];
  +          //if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  +          //  begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,2,1]; LD := B[Y1,X1,2,1]; end else
  +          //  begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,2,2]; LD := B[Y1,X1,2,0]; end;
           end;
           // Left Down Right %1101
          13: begin
  -         if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  -           begin LT := B[Y1,X1,0,1]; RT := B[Y1,X1,0,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,1]; end else
  -           begin LT := B[Y1,X1,0,0]; RT := B[Y1,X1,0,2]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,1]; end;
  +         LT := B[Y1,X1,0,1]; RT := B[Y1,X1,0,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,1];
  +         //if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  +         //  begin LT := B[Y1,X1,0,1]; RT := B[Y1,X1,0,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,1]; end else
  +         //  begin LT := B[Y1,X1,0,0]; RT := B[Y1,X1,0,2]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,1]; end;
          end;
           // Top Right Down %1110
          14: begin
  -         if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  -           begin LT := B[Y1,X1,1,0]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,0]; end else
  -           begin LT := B[Y1,X1,0,0]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,2,0]; end;
  +         LT := B[Y1,X1,1,0]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,0];
  +         //if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  +         //  begin LT := B[Y1,X1,1,0]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,1,0]; end else
  +         //  begin LT := B[Y1,X1,0,0]; RT := B[Y1,X1,1,1]; RD := B[Y1,X1,1,1]; LD := B[Y1,X1,2,0]; end;
          end;
           // Top Left Down %1011
          11: begin
  -         if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  -           begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,2]; RD := B[Y1,X1,1,2]; LD := B[Y1,X1,1,1]; end else
  -           begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,0,2]; RD := B[Y1,X1,2,2]; LD := B[Y1,X1,1,1]; end;
  +         LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,2]; RD := B[Y1,X1,1,2]; LD := B[Y1,X1,1,1];
  +         //if (B[Y1,X1,1,1] <= Byte(btStone)) OR (B[Y1,X1,1,1] = Byte(btDark)) then
  +         //  begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,1,2]; RD := B[Y1,X1,1,2]; LD := B[Y1,X1,1,1]; end else
  +         //  begin LT := B[Y1,X1,1,1]; RT := B[Y1,X1,0,2]; RD := B[Y1,X1,2,2]; LD := B[Y1,X1,1,1]; end;
           end;
         // All sides are equal
           else // or 15: begin end;
  
positive.code:   fRNG := TKMRandomNumberGenerator.Create;
    fRes := TKMBalancedResources.Create;
  
    // Default configuration
    with RMGSettings do
    begin
      with Locs do
      begin
        Active := True;
  
negative.code:   fRNG.Seed := RMGSettings.Seed;
    TileTemplateArr := TileTemplate(A);
  
    // Generate correct tiles
    fRNG.Seed := RMGSettings.Seed;
    if RMGSettings.Decomposition then
      GenerateBasicTiles(TilesPartsArr,TileTemplateArr)
    else if RMGSettings.BasicTiles then
      GenerateBasicTiles(TilesPartsArr,A)
    else
      GenerateTiles(TilesPartsArr, A, TileTemplateArr);
  