コード例 #1
0
        public List <ActionEv> GetActions(CardSet seen_cards, Card dealer_upcard, CardSet[] player_hands, int active_hand, List <ActionType> available_actions)
        {
            ValidateActions(player_hands[active_hand], available_actions);

            Shoe tmp_shoe = shoe.Copy();

            tmp_shoe.Remove(seen_cards);

            Eval.CacheDealerProbs(dealer_upcard.PointValue, tmp_shoe.ToArray());

            List <ActionEv> actions = new List <ActionEv>();

            foreach (ActionType a in available_actions)
            {
                double ev = GetActionEV(tmp_shoe, player_hands[active_hand], a, dealer_upcard);

                actions.Add(new ActionEv()
                {
                    Action = a, Ev = ev
                });
            }

            actions.Sort(delegate(ActionEv ae1, ActionEv ae2) { return(ae2.Ev.CompareTo(ae1.Ev)); });

            game_logger.Action(dealer_upcard, player_hands, active_hand, actions);

            return(actions);
        }