public void Stay() { round_replay.PushAction(0, Player.Hand.GetHighValue(), DealerHand.Cards[1].NumValue); while (DealerShouldHit()) { DealerHand.AddCard(Deck.DrawCard()); } if (DealerHand.HasBlackJack() && !Player.Hand.HasBlackJack()) { EndRound(false); } else if (DealerHand.GetHighValue() > 21) { EndRound(true); } else if (Player.Hand.GetHighValue() >= DealerHand.GetHighValue()) { EndRound(true); } else { EndRound(false); } }
public bool DealerShouldHit() //Dealer stays on all 17's { if (DealerHand.GetHighValue() < 17) { return(true); } return(false); }
public void EndRound(bool win) { CanAct = false; round_replay.PushAction(2, Player.Hand.GetHighValue(), DealerHand.GetHighValue()); round_replay.SetWin(win); }