HardTotal() 공개 메소드

public HardTotal ( ) : int
리턴 int
예제 #1
0
        private double GetActionEV(Shoe tmp_shoe, CardSet active_hand, ActionType action, Card dealer_upcard)
        {
            Hand hand = new Hand(active_hand);

            SHand shand;
            int   soft_total = hand.SoftTotal();

            if (soft_total <= 21 && hand.HasAce())
            {
                shand.Total = soft_total;
                shand.Soft  = true;
            }
            else
            {
                shand.Total = hand.HardTotal();
                shand.Soft  = false;
            }

            int[] shoe_counts = tmp_shoe.ToArray();
            int   upcard      = dealer_upcard.PointValue;

            switch (action)
            {
            case ActionType.Stand:

                return(Eval.StandEv(shand, upcard, shoe_counts));

            case ActionType.Hit:

                return(Eval.HitEv(shand, upcard, shoe_counts));

            case ActionType.Double:

                return(Eval.DoubleEv(shand, upcard, current_bet, shoe_counts));

            case ActionType.Split:

                return(Eval.SplitEv(active_hand[0].PointValue, upcard, current_bet, max_splits - split_count, shoe_counts));

            case ActionType.Surrender:

                return(Eval.SurrenderEv());
            }

            return(-1);
        }
예제 #2
0
        private double GetActionEV(Shoe tmp_shoe, CardSet active_hand, ActionType action, Card dealer_upcard)
        {
            Hand hand = new Hand(active_hand);

            SHand shand;
            int soft_total = hand.SoftTotal();
            if (soft_total <= 21 && hand.HasAce())
            {
                shand.Total = soft_total;
                shand.Soft = true;
            }
            else
            {
                shand.Total = hand.HardTotal();
                shand.Soft = false;
            }

            int[] shoe_counts = tmp_shoe.ToArray();
            int upcard = dealer_upcard.PointValue;

            switch (action)
            {
                case ActionType.Stand:

                    return Eval.StandEv(shand, upcard, shoe_counts);

                case ActionType.Hit:

                    return Eval.HitEv(shand, upcard, shoe_counts);

                case ActionType.Double:

                    return Eval.DoubleEv(shand, upcard, current_bet, shoe_counts);

                case ActionType.Split:

                    return Eval.SplitEv(active_hand[0].PointValue, upcard, current_bet, max_splits - split_count, shoe_counts);

                case ActionType.Surrender:

                    return Eval.SurrenderEv();
            }

            return -1;
        }
예제 #3
0
 public SHand(Hand hand)
 {
     int soft_total = hand.SoftTotal();
     if (soft_total <= 21 && hand.HasAce())
     {
         this.Total = soft_total;
         this.Soft = true;
     }
     else
     {
         this.Total = hand.HardTotal();
         this.Soft = false;
     }
 }