public double WinProb(PokerHand hand, int rIdx, int aIdx) { ulong hc = hand.HeroHoleCards(); ulong board = hand.BoardMask((Rounds)rIdx); int opponents = NumOpponents(hand, rIdx, aIdx); return Hand.WinOdds(hc, board, 0UL, opponents, 1000); }
public bool StraightDrawHit(PokerHand hand, int rIdx, int aIdx) { var prev = hand.Board((Rounds)(rIdx - 1)).ToMask(); var prevCount = Hand.CountContiguous(prev); if (prevCount != 2) return false; var board = hand.BoardMask((Rounds)rIdx); var hole = hand.HeroHoleCards(); foreach(var opp in Hand.Hands(0UL, hole | board, 2)) if (Hand.EvaluateType(board | opp) == Hand.HandTypes.Straight && Hand.EvaluateType(prev | opp) != Hand.HandTypes.Straight && Hand.IsOpenEndedStraightDraw(prev | opp, hole)) return true; return false; }
public bool TopPair(PokerHand hand, int rIdx, int aIdx) { if(Hand.EvaluateType(hand.HeroHoleCards() | hand.BoardMask((Rounds)rIdx)) != Hand.HandTypes.Pair) return false; var board = hand.Board((Rounds)rIdx); var top = board.Max(c => c.Rank); return top == hand.HoleCards[0].Rank || top == hand.HoleCards[1].Rank; }
public double PositivePotential(PokerHand hand, int rIdx, int aIdx) { double ppot, npot; Hand.HandPotential(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), out ppot, out npot, NumOpponents(hand, rIdx, aIdx), 1000); return ppot; }
public int StraightDrawCount(PokerHand hand, int rIdx, int aIdx) { return Hand.StraightDrawCount(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL); }
public int HandType(PokerHand hand, int rIdx, int aIdx) { return (int)Hand.EvaluateType(hand.HeroHoleCards() | hand.BoardMask((Rounds)rIdx)); }
public bool OpenEndedStraightDraw(PokerHand hand, int rIdx, int aIdx) { return Hand.IsOpenEndedStraightDraw(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL); }
public double HandStrength(PokerHand hand, int rIdx, int aIdx) { return Hand.HandStrength(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), NumOpponents(hand, rIdx, aIdx), 1000); }
public bool GutshotStraightDraw(PokerHand hand, int rIdx, int aIdx) { return Hand.IsGutShotStraightDraw(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL); }
public bool FourCardStraightHit(PokerHand hand, int rIdx, int aIdx) { var prev = hand.Board((Rounds)(rIdx - 1)).ToMask(); int prevCount = Hand.CountContiguous(prev); if (prevCount != 3) return false; return Hand.CountContiguous(hand.BoardMask((Rounds)rIdx)) == 4; }
public bool FlushDraw(PokerHand hand, int rIdx, int aIdx) { return Hand.IsFlushDraw(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL); }
public int BoardHand(PokerHand hand, int rIdx, int aIdx) { return (int)Hand.EvaluateType(hand.BoardMask((Rounds)rIdx)); }