Example #1
0
        private void game_PlayerActed(Guid playerId, ActionType action, int amountToCall, int amount)
        {
            var actionBucket = ActionAbstracter.MapToBucket(action, amountToCall, currentGame.PotSize, amount);

            actionHistory.Add(actionBucket);

            FeatureAction featureAction = FeatureActionAbstracter.FromActionBucket(actionBucket);

            var currentPhasehistory = actionHistoriesPerPhase.FirstOrDefault(x => x.Phase == currentGame.Phase);

            currentPhasehistory.ActionHistory.Add(featureAction);

            if (this.Id != playerId)
            {
                Positioning opponentPositioning = Positioning.None;
                Aggression  opponentAggression  = Aggression.None;
                if (currentGame.Phase > GamePhase.PreFlop)
                {
                    opponentPositioning = getOpponentPositioning(currentPhasehistory.ActionHistory.Count);
                    opponentAggression  = getOpponentAggression(opponentPositioning);
                }

                opponent.UpdateFeaturesAfterAction(currentPhasehistory.ActionHistory, currentGame.Phase, opponentAggression, opponentPositioning);
            }
        }
Example #2
0
        private void Game_PlayerActed(Guid playerId, ActionType action, int amountToCall, int amount)
        {
            var actionBucket = ActionAbstracter.MapToBucket(action, amountToCall, currentGame.PotSize, amount);

            actionHistory.Add(actionBucket);
        }