Пример #1
0
        public bool HasThisHand(Hand hand)
        {
            var x = from c in hand.Cards where c.Suit != hand.Cards[0].Suit select c;

            if (x.Count() > 0)
                return false;

            return true;
        }
Пример #2
0
        public bool HasThisHand(Hand hand)
        {
            ThreeOfAKind threeOfAKind = new ThreeOfAKind();
            OnePair onePair = new OnePair();

            return threeOfAKind.HasThisHand(hand) && onePair.HasThisHand(hand);
        }
Пример #3
0
        public bool HasThisHand(Hand hand)
        {
            int pairCount = 0;
            foreach (Faces face in hand.Histogram.Keys)
            {
                if (hand.Histogram[face] == 2)
                    pairCount++;
            }

            return pairCount == 2;
        }
Пример #4
0
        public bool HasThisHand(Hand hand)
        {
            foreach (Faces face in hand.Histogram.Keys)
            {
                if (hand.Histogram[face] == 3)
                    return true;
            }

            return false;
        }
Пример #5
0
        public bool HasThisHand(Hand hand)
        {
            Flush flush = new Flush();
            Straight straight = new Straight();

            return flush.HasThisHand(hand) && straight.HasThisHand(hand);
        }
Пример #6
0
        public bool HasThisHand(Hand hand)
        {
            if (hand.Cards[0].Face == hand.Cards[1].Face - 1
                && hand.Cards[1].Face == hand.Cards[2].Face - 1
                && hand.Cards[2].Face == hand.Cards[3].Face - 1
                && hand.Cards[3].Face == hand.Cards[4].Face - 1)
            {
                return true;
            }

            return false;
        }