anchor.diff:          // Left Down %1001
           9: begin LT := B[Y0,X1,2,0]; RT := B[Y1,X1,0,2]; RD := B[Y2,X1,0,2]; LD := B[Y1,X1,1,1]; end;
         // 3 sides are equal
  +      // Note: conditions are for special transitions between iron and gold mountains
           // Left Top Right %0111
  -        7: 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;
  +        7: begin
  +          if (B[Y1,X1,1,1] <= Byte(btStone)) 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 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;
  +       13: begin
  +         if (B[Y1,X1,1,1] <= Byte(btStone)) 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 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;
  +       14: begin
  +         if (B[Y1,X1,1,1] <= Byte(btStone)) 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 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;
  +       11: begin
  +         if (B[Y1,X1,1,1] <= Byte(btStone)) 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;
              begin LT := B[Y1,X1,0,0]; RT := B[Y1,X1,0,2]; RD := B[Y1,X1,2,2]; LD := B[Y1,X1,2,0]; end;
  
positive.code:     (1, 2, 2, 2, 1,  1, 2, 1, 2, 1,  1, 0, 0, 1, 2,  2, 2, 2, 1, 2,  2, 2, 2, 0), // 18 btStone
      (1, 2, 2, 2, 1,  1, 2, 1, 2, 1,  1, 0, 0, 1, 2,  1, 2, 2, 2, 1,  1, 0, 0, 0), // 19 btGold
      (1, 2, 2, 2, 1,  1, 2, 1, 2, 1,  1, 0, 0, 1, 2,  1, 2, 2, 2, 1,  1, 0, 0, 0), // 20 btEgold
      (1, 2, 2, 2, 1,  1, 2, 1, 2, 1,  1, 0, 0, 1, 2,  1, 2, 2, 2, 0,  0, 1, 1, 1), // 21 btIron
      (1, 2, 2, 2, 1,  1, 2, 1, 2, 1,  1, 0, 0, 1, 2,  1, 2, 2, 2, 0,  0, 1, 1, 1), // 22 btEIron
      (0, 0, 0, 0, 0,  0, 0, 0, 0, 0,  0, 0, 0, 0, 0,  0, 0, 0, 0, 0,  0, 1, 1, 1)  // 23 btDark
    );
  
  
negative.code:     ( 0, 0, 0, 0, 4,  7, 0, 7, 0, 9, 10,-1,-1,13, 0,  0, 0, 0,-1, 0,  0, 0, 0,-1), // 18 btStone
      ( 0, 0, 0, 0, 4,  7, 7, 7, 0, 9, 10,-1,-1,13,15, 15,15,15, 0,-1, -1,-1,-1,-1), // 19 btGold
      ( 0, 0, 0, 0, 4,  7, 7, 7, 0, 9, 10,-1,-1,13,15, 15,15,15, 0,-1, -1,-1,-1,-1), // 20 btEgold
      ( 0, 0, 0, 0, 4,  7, 7, 7, 0, 9, 10,-1,-1,13,15, 15,15,15, 0,20, 20,-1,-1,-1), // 21 btIron
      ( 0, 0, 0, 0, 4,  7, 7, 7, 0, 9, 10,-1,-1,13,15, 15,15,15, 0,20, 20,-1,-1,-1), // 22 btEIron
      (-1,-1,-1,-1,-1, -1,-1,-1,-1,-1, -1,-1,-1,-1,-1, -1,-1,-1,-1,-1, -1,22,21,-1)  // 23 btDark
    );
  
  