/// <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); }
public MahjongInfo(int weight) { m_weight = (MahjongWeight)weight; }
public MahjongInfo(MahjongWeight weight) { m_weight = weight; }