private static bool TryHand(HandRankings hand, ref Card[] table, HandDescriptor result) { switch (hand) { case HandRankings.Royal_Flush: return(TryRoyalFlush(ref table, result)); case HandRankings.Four_of_a_Kind: return(TryFourOfAKind(ref table, result)); case HandRankings.Straight_Flush: return(TryStraightFlush(ref table, result)); case HandRankings.Full_House: return(TryFullHouse(ref table, result)); case HandRankings.Flush: return(TryFlush(ref table, result)); case HandRankings.Straight: return(TryStraight(ref table, result)); case HandRankings.Three_of_a_Kind: return(TryThreeOfAKind(ref table, result)); case HandRankings.Two_Pair: return(TryTwoPair(ref table, result)); case HandRankings.Pair: return(TryPair(ref table, result)); case HandRankings.High_Card: return(HighCard(ref table, result)); } return(false); }
public PokerHand(List<Card> cards, HandRankings handRanking) { Cards = cards; HandRanking = handRanking; }