/** * Return string representing current equity of hand */ internal static String equityString(MEquity me) { String s; OmahaEquity hionly = me.eqs[0]; if (me.HiLo) { OmahaEquity hihalf = me.eqs[1]; OmahaEquity lohalf = me.eqs[2]; if (hionly.tied + hihalf.tied + lohalf.tied > 10) { // 50.0% (0:100, 0:70) s = String.Format("{0:0.00} ({1}:{2}, {3}:{4})%%", me.TotalEq, hionly.won + hihalf.won, hionly.tied + hihalf.tied, lohalf.won, lohalf.tied); } else { s = String.Format("%{0:0.00} ({1}, {2})%%", me.TotalEq, hionly.won + hihalf.won, lohalf.won); } } else { s = String.Format("{0:0.00}%%", hionly.won); if (hionly.tied > 1) { s += String.Format(" ({0:0.00}%% T)", hionly.tied); } } return(s); }
/// <summary> /// Make array of multiple hand equities for hi or hi/lo equity type, number of remaining cards, and calculation method /// </summary> /// <param name="hilo"></param> /// <param name="hands"></param> /// <param name="rem"></param> /// <param name="exact"></param> /// <returns></returns> internal static MEquity[] createMEquitiesHL(bool hilo, int hands, int rem, bool exact) { MEquity[] meqs = new MEquity[hands]; for (int n = 0; n < meqs.Length; n++) { meqs[n] = MEquity.createMEquityHL(hilo, rem, exact); } return(meqs); }
/// <summary> /// Make array of multiple hand equities for given equity type, number of remaining cards, calculation method /// </summary> /// <param name="eqtype"></param> /// <param name="hands"></param> /// <param name="rem"></param> /// <param name="exact"></param> /// <returns></returns> internal static MEquity[] createMEquities(OmahaEquity.EquityType eqtype, int hands, int rem, bool exact) { MEquity[] meqs = new MEquity[hands]; for (int n = 0; n < meqs.Length; n++) { meqs[n] = MEquity.createMEquity(eqtype, rem, exact); } return(meqs); }
/** * Return string representing current value of hand */ internal static String currentString(MEquity me) { String s = OmahaPoker.valueString(me.eqs[0].current); if (me.HiLo) { // s += " Hi: " + Poker.valueString(me.eqs[1].current); s += " / " + OmahaPoker.valueString(me.eqs[2].current); } return(s); }
internal static String equityStringShort(MEquity me) { return(String.Format("{0:0.00}", me.TotalEq)); }