/// <summary> /// Check if the current player has BlackJack /// </summary> /// <returns>Returns true if the current player has BlackJack</returns> public bool HasBlackJack() { if (hand.GetSumOfHand() == 21) { return(true); } else { return(false); } }
/// <summary> /// This method compares two BlackJack hands /// </summary> /// <param name="otherHand"></param> /// <returns></returns> public int CompareFaceValue(object otherHand) { BlackJackHand aHand = otherHand as BlackJackHand; if (aHand != null) { return(this.GetSumOfHand().CompareTo(aHand.GetSumOfHand())); } else { throw new ArgumentException("Argument is not a Hand"); } }