Пример #1
0
        public static bool isStraightFlush(Card[] cards, out ISpecialCases specialCase)
        {
            var highestNum = 0;

            specialCase = new FlushCase();
            if (!isSameSuit(cards))
            {
                return(false);
            }

            int[] nums;
            nums = arrayNums(cards, _dictionaryLowA);

            for (int x = 0; x <= nums.Length - 2; x++)
            {
                if (nums[x] + 1 != nums[x + 1])
                {
                    return(false);
                }
            }

            highestNum  = nums[nums.Length - 1];
            specialCase = new FlushCase()
            {
                HighestNumber = highestNum
            };

            return(true);
        }
Пример #2
0
        public static bool isFlush(Card[] cards, out ISpecialCases specialCase)
        {
            specialCase = new FlushCase();
            var highestNum = 0;

            if (!isSameSuit(cards))
            {
                return(false);
            }

            var nums = arrayNums(cards, _dictionaryHighA);

            highestNum  = nums[nums.Length - 1];
            specialCase = new FlushCase()
            {
                HighestNumber = highestNum
            };
            return(true);
        }