コード例 #1
0
        public CombinationType GetCombinationType(Card[] cards)
        {
            if (_straightFlushCombinationChecker.Check(cards))
            {
                return(CombinationType.StraightFlush);
            }

            if (_fourOfAKindCombinationChecker.Check(cards))
            {
                return(CombinationType.FourOfAKind);
            }

            if (_fullHouseCombinationCheckerCombinationChecker.Check(cards))
            {
                return(CombinationType.FullHouse);
            }

            if (_flushCombinationChecker.Check(cards))
            {
                return(CombinationType.Flush);
            }

            if (_straightCombinationChecker.Check(cards))
            {
                return(CombinationType.Straight);
            }

            if (_threeOfAKindCombinationChecker.Check(cards))
            {
                return(CombinationType.ThreeOfAKind);
            }

            if (_twoPairCombinationChecker.Check(cards))
            {
                return(CombinationType.TwoPairs);
            }

            if (_pairCombinationChecker.Check(cards))
            {
                return(CombinationType.Pair);
            }

            return(CombinationType.Kiker);
        }
コード例 #2
0
 public bool Check(Card[] cards)
 {
     return(_pairCombinationChecker.Check(cards) && _threeOfAKindCombinationChecker.Check(cards));
 }