コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }