public void Stand() // Dealers turn after the player stands { if (Result == GameResult.Pending) { while (BlackJackRules.CanDealerHit(Dealer.Hand, StandLimit)) { Dealer.Hand.Push(MainDeck.Pop()); } Result = BlackJackRules.GetResult(Player, Dealer); } }
public void Hit() // Allow the player to hit (take a card) { if (BlackJackRules.CanPlayerHit(Player.Hand) && Result == GameResult.Pending) { if (BlackJackRules.hitting != 0) { Player.Hand.Push(MainDeck.Pop()); } Result = BlackJackRules.GetResult(Player, Dealer); } }