private void OnDeal(string cards) { _sei.Reset(); _pocket = StdDeck.Descriptor.GetCardSet(cards); _sePocket = _sei.Convert(_pocket); _pocketKind = HePockets.CardSetToPocketKind(_sePocket); log.InfoFormat("{0} OnDeal() pocket {1} iso {2} kind {3}", _name, _pocket, _sePocket, _pocketKind); }
public int GetBucket(CardSet pocket, CardSet board, int round) { int bucket; if (round == 0) { // preflop bucket = (int)HePockets.CardSetToPocketKind(pocket); } else { float hs = HandStrength.CalculateFast(pocket, board); bucket = (int)(BucketCount[round] * hs); if (bucket == BucketCount[round]) { bucket--; // Special correction for a single HS value of 1.0 } } return(bucket); }