Ejemplo n.º 1
0
        private PokerHand ToPokerHand(CardCombination combination, ISet <Card> cards)
        {
            var unusedCardsInCombination = cards.Except(combination.Cards);
            var kickerAmount             = 5 - combination.Cards.Count;
            var kickers = unusedCardsInCombination.OrderByDescending(c => c.Value).Take(kickerAmount);

            return(new PokerHand(combination, kickers));
        }
Ejemplo n.º 2
0
 public PokerHand(CardCombination cardCombination, IEnumerable <Card> kickers)
 {
     CardCombination = cardCombination;
     Kickers         = kickers.ToList();
 }