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)); }
public PokerHand(CardCombination cardCombination, IEnumerable <Card> kickers) { CardCombination = cardCombination; Kickers = kickers.ToList(); }