Esempio n. 1
0
        /// <summary>
        /// 暗杆
        /// </summary>
        /// <param name="list"></param>
        /// <param name="weight"></param>
        /// <returns></returns>
        public bool IsAnGang(List <MahjongInfo> list, out MahjongWeight weight)
        {
            List <IGrouping <MahjongWeight, MahjongInfo> > result = list.GroupBy(x => x.m_weight).Where(x => x.Count() == 4).ToList();

            if (result.Count > 0)
            {
                MahjongWeight mahjongWeight = result[0].Key;
                weight = mahjongWeight;
                return(true);
            }
            weight = 0;
            return(false);
        }
Esempio n. 2
0
 public MahjongInfo(int weight)
 {
     m_weight = (MahjongWeight)weight;
 }
Esempio n. 3
0
 public MahjongInfo(MahjongWeight weight)
 {
     m_weight = weight;
 }