Ejemplo n.º 1
0
        public string GetCardStyleName()
        {
            string ret    = String.Empty;
            bool   bSame3 = true;
            var    card0  = handCardsData[0];
            var    card1  = handCardsData[1];
            var    card2  = handCardsData[2];

            if (card0 == card1 && card0 == card2)
            {
                //三公
                if (bGongCard(card0))
                {
                    //大三公
                    return("大三公");
                }
                else
                {
                    //小三公
                    return("小三公");
                }
            }
            else if (bGongCard(card0) && bGongCard(card1) && bGongCard(card2))
            {
                //混三公
                return("混三公");
            }
            else
            {
                //点数
                var cp0        = CardManager.CConvert2Num((bGongCard(card0) || card0 % 10 == 0) ? 0 : card0);
                var cp1        = CardManager.CConvert2Num((bGongCard(card1) || card1 % 10 == 0) ? 0 : card1);
                var cp2        = CardManager.CConvert2Num((bGongCard(card2) || card2 % 10 == 0) ? 0 : card2);
                var tablePoint = cp0 + cp1 + cp2;
                return(string.Format("{0}点", tablePoint % 10));
            }
        }