示例#1
0
 /// <summary>
 /// Set up to play the game,
 /// by shuffling the pile of cards and dealing the two hands.
 /// </summary>
 public static void SetUpGame()
 {
     cardPile = new CardPile(true);
     cardPile.Shuffle();
     hands[USER]               = new Hand(cardPile.DealCards(NUM_OF_STARTING_CARDS));
     hands[DEALER]             = new Hand(cardPile.DealCards(NUM_OF_STARTING_CARDS));
     numOfUserAcesWithValueOne = 0;
     playerHasBust             = false;
     numberOfCardsDealt        = 0;
 } //end SetUpGame
示例#2
0
 /// <summary>
 /// Set up to play the game,
 /// by shuffling the drawPile of cards
 /// and then dealing the two hands.
 /// </summary>
 public static void SetUpGame()
 {
     PlayerWon = false;
     drawPile  = new CardPile(true);
     drawPile.Shuffle();
     hands[USER]     = new Hand(drawPile.DealCards(NUM_OF_STARTING_CARDS));
     hands[COMPUTER] = new Hand(drawPile.DealCards(NUM_OF_STARTING_CARDS));
     SetUpTheDiscardPile();
     hands[USER].Sort();
     hands[COMPUTER].Sort();
 } //end SetUpGame