Esempio n. 1
0
 public static void GameContext_NewFlop(DecisionMakingContext dmContext, Board board, HoleCards heroHoleCards)
 {
     GameContext_NewFlop(dmContext.GC,
                         board.Flop[0].ToString(),
                         board.Flop[1].ToString(),
                         board.Flop[2].ToString(),
                         (heroHoleCards != null) ? heroHoleCards.ToString() : null);
 }
Esempio n. 2
0
 public void CutRange(ActionType actionType, Street currentStreet, Board board, float betRaiseChance, float checkCallChance, DecisionMakingContext dmContext)
 {
     if (actionType == ActionType.Check || actionType == ActionType.Bet)
     {
         Range.CutCheckBet(actionType, currentStreet, board, betRaiseChance, dmContext);
     }
     else if (actionType == ActionType.Call || actionType == ActionType.Raise || actionType == ActionType.AllIn)
     {
         Range.CutFoldCallRaise(actionType, currentStreet, board, betRaiseChance, checkCallChance, dmContext);
     }
 }
Esempio n. 3
0
        public void CutFoldCallRaise(ActionType actionType, Street street, Board board, float raiseChance, float callChance, DecisionMakingContext dmContext)
        {
            CuttingParams.Add(new CuttingParamsT
            {
                ActionType = actionType,
                Street     = street,
                Value1     = raiseChance,
                Value2     = callChance,
                Forced     = true
            });

            DecisionMakingDll.CutRange_FoldCallRaise(this, actionType, street, board, raiseChance, callChance, dmContext);
        }
Esempio n. 4
0
        public void CutCheckBet(ActionType actionType, Street street, Board board, float betChance, DecisionMakingContext dmContext)
        {
            CuttingParams.Add(new CuttingParamsT
            {
                ActionType = actionType,
                Street     = street,
                Value1     = betChance,
                Forced     = false
            });

            DecisionMakingDll.CutRange_CheckBet(this, actionType, street, board, betChance, dmContext);
        }
Esempio n. 5
0
        public static void Holdem_EstimateEV(out float checkCallEV, out float betRaiseEV, int buttonInd, int heroIndex, HoleCards heroHoleCards,
                                             List <Player> playerList, Board board, Street street, int numBets, int numCallers, int bigBlindSize, DecisionMakingContext dmContext)
        {
            Unmanaged_HoleCards uHoleCards = new Unmanaged_HoleCards(heroHoleCards);

            Unmanaged_Player[] players = new Unmanaged_Player[playerList.Count];

            for (int i = 0; i < playerList.Count; i++)
            {
                players[i] = new Unmanaged_Player(playerList[i], i);
            }

            Unmanaged_Card[] cards = BoardToUnmanaged(board);

            checkCallEV = 0.0f;
            betRaiseEV  = 0.0f;

            EstimateEV(ref checkCallEV, ref betRaiseEV, buttonInd, heroIndex, ref uHoleCards, players, playerList.Count, cards,
                       (int)street, numBets, numCallers, bigBlindSize, dmContext.GC);
        }
Esempio n. 6
0
        public static void PredictAction_FoldCallRaise(ref float toFold, ref float toCall, ref float toRaise, Range range,
                                                       Street street, Board board, float raiseChance, float callChance, DecisionMakingContext dmContext)
        {
            Unmanaged_Range unmanagedRange = new Unmanaged_Range(range);

            Unmanaged_Card[] cards = BoardToUnmanaged(board);

            PredictAction_FoldCallRaise(ref toFold, ref toCall, ref toRaise, ref unmanagedRange, (int)street, cards, raiseChance, callChance, dmContext.GC);
        }
Esempio n. 7
0
        public static void PredictAction_CheckBet(ref float toCheck, ref float toBet, Range range, Street street, Board board, float betChance, DecisionMakingContext dmContext)
        {
            Unmanaged_Range unmanagedRange = new Unmanaged_Range(range);

            Unmanaged_Card[] cards = BoardToUnmanaged(board);

            PredictAction_CheckBet(ref toCheck, ref toBet, ref unmanagedRange, (int)street, cards, betChance, dmContext.GC);
        }
Esempio n. 8
0
        public static void CutRange_FoldCallRaise(Range range, ActionType actionType, Street street, Board board, float raiseChance, float callChance, DecisionMakingContext dmContext)
        {
            Unmanaged_Range unmanagedRange = new Unmanaged_Range(range);

            Unmanaged_Card[] cards = BoardToUnmanaged(board);

            CutRange_FoldCallRaise(ref unmanagedRange, (int)actionType, (int)street, cards, raiseChance, callChance, dmContext.GC);
            unmanagedRange.ToManaged(range);
        }
Esempio n. 9
0
        public static void CutRange_CheckBet(Range range, ActionType actionType, Street street, Board board, float betChance, DecisionMakingContext dmContext)
        {
            Unmanaged_Range unmanagedRange = new Unmanaged_Range(range);

            Unmanaged_Card[] cards = BoardToUnmanaged(board);

            CutRange_CheckBet(ref unmanagedRange, (int)actionType, (int)street, cards, betChance, dmContext.GC);
            unmanagedRange.ToManaged(range);
        }
Esempio n. 10
0
        public static void Range_GetSortedHoleCards(Range range, Street street, Board board, DecisionMakingContext dmContext)
        {
            Unmanaged_Range unmanagedRange = new Unmanaged_Range(range);

            Unmanaged_Card[] cards = BoardToUnmanaged(board);

            Range_GetSortedHoleCards(ref unmanagedRange, (int)street, cards, dmContext.GC);
            unmanagedRange.ToManaged(range);
        }