private static bool SetFlushKickers(AbstractSuit suit) { var isFlush = false; const int numberOfCardsToMakeAFlush = 5; Kickers = new long[numberOfCardsToMakeAFlush]; var numberOfSuitedCards = CountSetBits(suit.ToLong()); if (numberOfSuitedCards >= numberOfCardsToMakeAFlush) { CountCards(suit.ToLong()); var cpt = 0; foreach (var entry in CardsCount) { if (entry.Value > 0 && cpt < numberOfCardsToMakeAFlush) { Kickers[cpt] = entry.Key; Kickers[cpt] <<= suit.Shift; cpt++; } } isFlush = true; } return(isFlush); }
private static bool SetFlushKickers(AbstractSuit suit) { var isFlush = false; const int numberOfCardsToMakeAFlush = 5; Kickers = new long[numberOfCardsToMakeAFlush]; var numberOfSuitedCards = CountSetBits(suit.ToLong()); if (numberOfSuitedCards >= numberOfCardsToMakeAFlush) { CountCards(suit.ToLong()); var cpt = 0; foreach (var entry in CardsCount) { if (entry.Value > 0 && cpt < numberOfCardsToMakeAFlush) { Kickers[cpt] = entry.Key; Kickers[cpt] <<= suit.Shift; cpt++; } } isFlush = true; } return isFlush; }