/// <summary> /// 牌を組み立てます。 /// </summary> /// <returns>牌</returns> /// <param name="kind">種類</param> /// <param name="number">数</param> /// <param name="isRed">赤ドラかどうか</param> public static uint BuildTile(Kind kind, int number = 0, bool isRed = false) { Debug.Assert((kind.GetGroup() == Group.Honours && number == 0) || (kind.GetGroup() == Group.Suits && Numbers.Contains(number) || (kind.GetGroup() == Group.Empty && number == 0)), $"数が不正です。{number}"); return((uint)kind | ((uint)number << Tile.NumberShift) | ((isRed ? 1u : 0u) << Tile.RedFiveShift)); }