Ejemplo n.º 1
0
        public bool IsCardPartOfStrongerHand(BTCard BTCard)
        {
            if (!this.Contains(BTCard))
            {
                throw new ArgumentOutOfRangeException("We don't have a " + BTCard.GetCardName());
            }

            // check if it's part of a pair, this return true for trips and quads as well.
            var isAtleastPair = GetSameValuedCards(BTPokerHands.Double)
                                .Any(g => g
                                     .Any(c => c.Value == BTCard.Value)
                                     );


            // todo: check if it's part of a poker hand


            // not part of stronger hand.
            return(isAtleastPair);
        }