Beispiel #1
0
        /// <summary>
        /// 获取手牌中的风牌
        /// </summary>
        /// <returns></returns>
        private List <int> GetFengHandCards()
        {
            Predicate <int> match      = value => value >= (int)EnumMahjongValue.Dong && value <= (int)EnumMahjongValue.Bai;
            var             mathchList = HandCardList.FindAll(match);

            mathchList.Sort();
            return(mathchList);
        }
Beispiel #2
0
        protected override void GetDealGetInShowItem()
        {
            var laiZiValue = GetLaiZiValue();
            var findIndex  = HandCardList.FindIndex(item => item != laiZiValue);

            if (findIndex == -1)
            {
                LastGetValue = HandCardList.First();
            }
            else
            {
                LastGetValue = HandCardList[findIndex];
            }
            base.GetDealGetInShowItem();
        }
Beispiel #3
0
        private void TryAddFengList(int[] arr, int laiZiNum)
        {
            bool state = true;

            foreach (var item in arr)
            {
                if (!HandCardList.Contains(item) || item.Equals(laiZiNum))
                {
                    state = false;
                    break;
                }
            }
            if (state)
            {
                _specialGangList.Add(arr);
            }
        }