TileSides GetGeneralSide(SidesLink one, SidesLink two)
 {
     if (one.begin == two.begin || one.begin == two.end)
     {
         return(one.begin);
     }
     else if (one.end == two.begin || one.end == two.end)
     {
         return(one.end);
     }
     return(TileSides.None);
 }
        TileSides GetRighterSide(SidesLink link)
        {
            int begin = (int)link.begin;
            int end   = (int)link.end;

            if (((begin + 1) & 3) == end)
            {
                return(link.end);
            }
            else
            {
                return(link.begin);
            }
        }
 int CalculateLink(SidesLink link)
 {
     return((int)link.begin + (int)link.end);
 }