GR.Gambling.Blackjack.BonusPairsAgent.GetAction C# (CSharp) Method

GetAction() public method

public GetAction ( CardSet seen_cards, Card dealer_upcard, CardSet player_hands, int active_hand, List available_actions ) : ActionType
seen_cards CardSet
dealer_upcard Card
player_hands CardSet
active_hand int
available_actions List
return ActionType
        public override ActionType GetAction(CardSet seen_cards, Card dealer_upcard, CardSet[] player_hands, int active_hand, List<ActionType> available_actions)
        {
            List<ActionEv> actions = GetActions(seen_cards, dealer_upcard, player_hands, active_hand, available_actions);

            ActionType best = actions[0].Action;

            if (best == ActionType.Split)
            {
                split_count++;
            }
            else if (best == ActionType.Double)
            {
                hand_doubled[active_hand] = true;
            }
            else if (best == ActionType.Surrender)
            {
                surrendered = true;
            }

            action_count++;

            return best;
        }