예제 #1
0
 // Check if the hand has BlackJack
 public bool HasBlackJack()
 {
     if (hand.GetSumOfHand() == 21 && hand.Cards.Count == 2)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
 // This method compares two BlackJack hands
 public int CompareHandsValue(BlackJackHand otherHand)
 {
     if (otherHand != null)
     {
         return(this.GetSumOfHand().CompareTo(otherHand.GetSumOfHand()));
     }
     else
     {
         throw new ArgumentException("Argument is not a Hand");
     }
 }