Example #1
0
 /// <summary>
 /// create holdem equity calculator for given game type
 /// </summary>
 /// <param name="omaha"></param>
 /// <param name="hilo"></param>
 /// <param name="hi"></param>
 /// <param name="lo"></param>
 public OmahaEquityCalculatorMain(bool omaha, bool hilo, OmahaValue hi, OmahaValue lo) : base(hi)
 {
     this.omaha   = omaha;
     this.loValue = lo;
     this.min     = omaha ? 2 : 0;
     this.hilo    = hilo;
 }
Example #2
0
        /// <summary>
        /// Calculate value of holdem/omaha hand (using at least min cards from hand). Board can be 3-5 cards.
        /// </summary>
        /// <param name="Value"></param>
        /// <param name=""></param>
        /// <param name="String"></param>
        /// <param name=""></param>
        /// <param name="String"></param>
        /// <param name=""></param>
        /// <param name="String"></param>
        /// <param name=""></param>
        /// <returns></returns>
        private int heValue(OmahaValue v, String[] board, String[] hole, String[] temp)
        {
            int hv = 0;

            for (int n = min; n <= 2; n++)
            {
                int nh = MathsUtil.binomialCoefficientFast(hole.Length, n);
                int nb = MathsUtil.binomialCoefficientFast(board.Length, 5 - n);
                for (int kh = 0; kh < nh; kh++)
                {
                    MathsUtil.kCombination(n, kh, hole, temp, 0);
                    for (int kb = 0; kb < nb; kb++)
                    {
                        MathsUtil.kCombination(5 - n, kb, board, temp, n);
                        int val = v.value(temp);
                        //System.out.println(Arrays.asList(h5) + " - " + Poker.desc(v));
                        if (val > hv)
                        {
                            hv = val;
                        }
                    }
                }
            }
            return(hv);
        }
Example #3
0
 public OmahaPoker(OmahaValue value)
 {
     this.value = value;
 }
Example #4
0
 public OmahaPokerEquity(OmahaValue value)
 {
     this.Value = value;
 }