private static bool HighCard(ref Card[] table, HandDescriptor result) { result.Rank = HandRankings.High_Card; result.GenerateTiebreaker(table); return(true); }
private static bool TryFlush(ref Card[] table, HandDescriptor result) { for (int suit = 0; suit < 4; suit++) { if (table.Count(c => c.Suit == (Suit)suit) >= 5) { result.Rank = HandRankings.Flush; result.GenerateTiebreaker(table.Where(c => c.Suit == (Suit)suit)); return(true); } } return(false); }