Example #1
0
 private void ResetDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         int numberOfCards = random.Next(1, 11);
         deck1 = new Deck(new Card[] { });
         for (int i = 0; i < numberOfCards; i++)
             deck1.Add(new Card((Suits)random.Next(4),
                                (Values)random.Next(1, 14)));
         deck1.Sort();
     }
     else
         deck2 = new Deck();
 }
Example #2
0
 private void ResetDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         int numberOfCards = random.Next(1, 11);
         deck1 = new Deck(new Card[] { });
         for (int i = 0; i < numberOfCards; i++)
         {
             deck1.Add(new Card((Suit)random.Next(4), (Value)random.Next(1, 14)));
         }
         deck1.Sort();
     }
     else
     {
         deck2 = new Deck();
     }
 }
Example #3
0
 public void ResetDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         int numberOfCards = random.Next(1,11);
         List<Card> cards = new List<Card>();
         for (int i = 0; i < numberOfCards; i++)
         {
             cards.Add(new Card((Suits)random.Next(4), (Values)random.Next(1,14)));
         }
         deck1 = new Deck(cards);
         deck1.Sort();
     }
     else
     {
         deck2 = new Deck();
     }
 }
Example #4
0
 public void ResetDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         int         numberOfCards = random.Next(1, 11);
         List <Card> cards         = new List <Card>();
         for (int i = 0; i < numberOfCards; i++)
         {
             cards.Add(new Card((Suits)random.Next(4), (Values)random.Next(1, 14)));
         }
         deck1 = new Deck(cards);
         deck1.Sort();
     }
     else
     {
         deck2 = new Deck();
     }
 }