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; }
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()); } }
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; }