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 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 Suited(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.IsSuited(hand.HeroHoleCards());
 }
 public int SklanskyGroup(PokerHand hand, int rIdx, int aIdx)
 {
     return (int)PocketHands.GroupType(hand.HeroHoleCards());
 }
 public int StraightDrawCount(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.StraightDrawCount(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL);
 }
 public bool OpenEndedStraightDraw(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.IsOpenEndedStraightDraw(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL);
 }
 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 HandType(PokerHand hand, int rIdx, int aIdx)
 {
     return (int)Hand.EvaluateType(hand.HeroHoleCards() | hand.BoardMask((Rounds)rIdx));
 }
Ejemplo n.º 10
0
 public double HandStrength(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.HandStrength(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), NumOpponents(hand, rIdx, aIdx), 1000);
 }
Ejemplo n.º 11
0
 public bool GutshotStraightDraw(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.IsGutShotStraightDraw(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL);
 }
Ejemplo n.º 12
0
 public bool FlushDraw(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.IsFlushDraw(hand.HeroHoleCards(), hand.BoardMask((Rounds)rIdx), 0UL);
 }
Ejemplo n.º 13
0
 public bool Connectors(PokerHand hand, int rIdx, int aIdx)
 {
     return Hand.IsConnected(hand.HeroHoleCards());
 }