Example #1
0
        private EstimatedAD getPlayerToActAD(Player playerToAct, BotGameState gameState)
        {
            if (gameState.getStreet() == Street.PreFlop)
            {
                var preFlopParams = new PreFlopParams(
                    gameState.getTableType(),
                    playerToAct.PreFlopPosition,
                    gameState.getNumCallers(),
                    gameState.getNumBets(),
                    gameState.numActivePlayers(),
                    playerToAct.LastAction,
                    gameState.isPlayerInPosition(gameState.getPlayerToActInd()));

                return(playerToAct.GetAD(preFlopParams));
            }
            else
            {
                var        round      = playerToAct.Round();
                ActionType prevAction = (round == 0) ? playerToAct.PrevStreetAction : playerToAct.LastAction;

                var postFlopParams = new PostFlopParams(
                    gameState.getTableType(),
                    gameState.getStreet(),
                    round,
                    prevAction,
                    gameState.getNumBets(),
                    gameState.isPlayerInPosition(gameState.getPlayerToActInd()),
                    gameState.numActivePlayers());

                return(playerToAct.GetAD(postFlopParams));
            }
        }
Example #2
0
        public string paramsToString()
        {
            string str = "";

            var allPreFlopParams = PreFlopParams.getAllParams(TableType);

            for (int i = 0; i < allPreFlopParams.Count; i++)
            {
                str += allPreFlopParams[i].ToString() + "; ";
                str += PreFlopAD[i].ToString() + "\n";
            }

            var allPostFlopParams = PostFlopParams.getAllParams(TableType);

            for (int i = 0; i < allPostFlopParams.Count; i++)
            {
                str += allPostFlopParams[i].ToString() + "; ";
                str += PostFlopAD[i].ToString() + "\n";
            }

            return(str);
        }