public static Pokerscore CalculateTurnScore(List <Card> cards)
        {
            Pokerscore bestScore = Pokerscore.None;

            foreach (var combination in PokerEnumerator.GetCombinationsOfNMinusOne(cards, 5))
            {
                Pokerscore score = PokerLogic.Score(new FiveCardHand(combination));

                if (score > bestScore)
                {
                    bestScore = score;
                }
            }

            return(bestScore);
        }
        public void CombinationTestingFourFromFive()
        {
            int         count = 0;
            List <Card> cards = new List <Card>
            {
                new Card(Rank.Ace, Suit.Diamonds),
                new Card(Rank.Two, Suit.Diamonds),
                new Card(Rank.Three, Suit.Diamonds),
                new Card(Rank.Four, Suit.Diamonds),
                new Card(Rank.Five, Suit.Diamonds)
            };

            foreach (var comb in PokerEnumerator.GetCombinationsOfNMinusOne(cards, 4))
            {
                count++;
                Assert.AreEqual(comb.Count(), 4);
            }

            Assert.AreEqual(count, 5);
        }