Exemple #1
0
        /// <summary>
        /// Method checks if a card holder's got the BlackJack
        /// </summary>
        /// <param name="cardHolder">Card holder</param>
        /// <returns>true if a cardholder's got the BlackJack; false - otherwise</returns>
	    public bool CheckBlackJack( CardHolder cardHolder )
        {
            return (cardHolder.CountScore() == 21);
        }
Exemple #2
0
        /// <summary>
        /// Method checks if a card holder's got the BlackJack with "777" combination
        /// </summary>
        /// <param name="cardHolder">Card holder</param>
        /// <returns>true if a cardholder's got the "777" combination; false - otherwise</returns>
        public bool Check777( CardHolder cardHolder )
        {
            if (cardHolder.CountScore() == 21)
            {
                CardSet hand = cardHolder.PlayerHand;

                if (hand.GetCardsNumber() == 3)
                    if (hand[0].Rank == 7 && hand[1].Rank == 7 && hand[2].Rank == 7)
                        return true;
            }

            return false;
        }
Exemple #3
0
 /// <summary>
 /// Method checks if a card holder's got the BlackJack
 /// </summary>
 /// <param name="cardHolder">Card holder</param>
 /// <returns>true if a cardholder's got the BlackJack; false - otherwise</returns>
 public bool CheckBlackJack(CardHolder cardHolder)
 {
     return(cardHolder.CountScore() == 21);
 }