コード例 #1
0
        public override List <ActionEv> GetActions(Game game)
        {
            SuperEval.Initialize(game);

            int split_card = game.PlayerHandSet.ActiveHand[0].PointValue;

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

            if (game.IsValidAction(ActionType.Stand))
            {
                actions.Add(new ActionEv()
                {
                    Action = ActionType.Stand, Ev = SuperEval.StandEv()
                });
            }
            if (game.IsValidAction(ActionType.Hit))
            {
                actions.Add(new ActionEv()
                {
                    Action = ActionType.Hit, Ev = SuperEval.HitEv()
                });
            }
            if (game.IsValidAction(ActionType.Double))
            {
                actions.Add(new ActionEv()
                {
                    Action = ActionType.Double, Ev = SuperEval.DoubleEv()
                });
            }
            if (game.IsValidAction(ActionType.Surrender))
            {
                actions.Add(new ActionEv()
                {
                    Action = ActionType.Surrender, Ev = SuperEval.SurrenderEv()
                });
            }
            if (game.IsValidAction(ActionType.Split))
            {
                actions.Add(new ActionEv()
                {
                    Action = ActionType.Split, Ev = SuperEval.SplitEv(split_card, game.Rules.Splits - game.SplitCount)
                });
            }

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

            return(actions);
        }
コード例 #2
0
 public override bool TakeInsurance(Game game)
 {
     return(SuperEval.TakeInsurance(game));
 }