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); }
public void StartGame(Shoe shoe, double shoe_ev, int bet_size) { this.take_insurance = false; this.shoe = shoe.Copy(); this.shoe_ev = shoe_ev; this.bet_size = bet_size; this.action_history = new List <ActionInfo>(); }
public void StartGame(Shoe shoe, double shoe_ev, int bet_size) { this.take_insurance = false; this.shoe = shoe.Copy(); this.shoe_ev = shoe_ev; this.bet_size = bet_size; this.action_history = new List<ActionInfo>(); }