/// <summary> /// Gets the first high card ater the pair, in the provided hand /// </summary> /// <param name="hand">The provided hand, presumes this hand is of type <see cref="TwoOfAKindHand"/>.</param> /// <returns>The first high card ater the pair, empty card if no such card exists.</returns> internal static Card GetHighCard(Hand hand) { TwoOfAKindHand realHand = (TwoOfAKindHand)hand; if (!realHand.cards[0].AreOfSameNumericValue(realHand.cards[2])) { return(realHand.cards[2]); } return(Card.Empty); }
/// <summary> /// Returns the pair in the provided <see cref="Hand"/> /// </summary> /// <param name="hand">The provided hand, presumes this hand is of type <see cref="TwoOfAKindHand"/>.</param> /// <returns>The first pair of cards in the hand</returns> internal static KeyValuePair <Card, Card> GetPair(Hand hand) { TwoOfAKindHand realHand = (TwoOfAKindHand)hand; return(new KeyValuePair <Card, Card>(realHand.cards[0], realHand.cards[1])); }