示例#1
0
        public Action Get(Hand dealerhand)
        {
            _DealerHand = dealerhand;

            if (_DealerHand.Value < 17) return Action.Hit;
            if (_DealerHand.Value == 17 && (_DealerHand.Soft == false || _HitSoft17)) return Action.Hit;

            return Action.Stand;
        }
示例#2
0
        public void Deal()
        {
            _DealerHand = new Hand();
            _DealerHand.Add(_Deck.Draw());
            _DealerHand.Add(_Deck.Draw());

            for(int i = 0; i < _PlayerHands.Count; i++)
            {
                _PlayerHands[i] = new Hand();
                _PlayerHands[i].Add(_Deck.Draw());
                _PlayerHands[i].Add(_Deck.Draw());
            }
        }
示例#3
0
        public Action Get(Hand playerhand, Card dealercard)
        {
            _PlayerHand = playerhand;
            _DealerCard = dealercard;

            if (_PlayerHand.Value < 14) return Action.Hit;

            if (_PlayerHand.Value < 17)
            {
                if (_DealerCard.Index == 0 || _DealerCard.Index > 6)
                {
                    return Action.Hit;
                }
            }

            return Action.Stand;
        }