示例#1
0
 /// <summary>
 /// 比較花色
 /// </summary>
 /// <param name="_PlayingCardArrat"></param>
 /// <returns></returns>
 private string ComparisonTwoCardsPattern(PlayingCard _Card1, PlayingCard _Card2)
 {
     if (_Card1.PatternRank > _Card2.PatternRank)
     {
         return(">");
     }
     else
     {
         return("<");
     }
 }
示例#2
0
        /// <summary>
        /// 給牌大小排名
        /// </summary>
        /// <param name="_PlayingCardGroup"></param>
        private void GiveRank(PlayingCardGroup _PlayingCardGroup)
        {
            for (int i = 0; i < _PlayingCardGroup.UnflippedsCount;)
            {
                PlayingCard P = _PlayingCardGroup.PumpingUnflop(0);
                if (P.Word == "2")
                {
                    P.WordRank = 13;
                }
                else if (P.Word == "A")
                {
                    P.WordRank = 12;
                }
                else if (P.Word == "K")
                {
                    P.WordRank = 11;
                }
                else if (P.Word == "Q")
                {
                    P.WordRank = 10;
                }
                else if (P.Word == "J")
                {
                    P.WordRank = 9;
                }
                else if (P.Ghost == false)
                {
                    P.WordRank = Convert.ToInt32(P.Word) - 2;
                }

                if (P.Pattern_Name == "黑桃")
                {
                    P.PatternRank = 4;
                }
                else if (P.Pattern_Name == "紅心")
                {
                    P.PatternRank = 3;
                }
                else if (P.Pattern_Name == "方塊")
                {
                    P.PatternRank = 2;
                }
                else if (P.Pattern_Name == "梅花")
                {
                    P.PatternRank = 1;
                }
            }
            for (int i = 0; i < _PlayingCardGroup.FlippedCardCount;)
            {
                _PlayingCardGroup.UnPumpingUnflop(0);
            }
        }
示例#3
0
 /// <summary>
 /// 比較兩張牌
 /// </summary>
 /// <param name="_Card1"></param>
 /// <param name="_Card2"></param>
 /// <returns></returns>
 public override string ComparisonTwoCards(PlayingCard _Card1, PlayingCard _Card2)
 {
     return(ComparisonTwoCardsWord(_Card1, _Card2));
 }
示例#4
0
 /// <summary>
 /// 兩張牌比大小
 /// </summary>
 /// <returns></returns>
 abstract public string ComparisonTwoCards(PlayingCard _Card1, PlayingCard _Card2);