Beispiel #1
0
 public Card[] GetCards()
 {
     Card[] distr = new Card[6];
     for (int i = 0; i < distr.Length; ++i)
         distr[i] = GetCard();
     return distr;
 }
Beispiel #2
0
 void FillTheDeck()
 {
     int i = 0;
     for (short j = 2; j < 15; ++j)
     {
         deck[i++] = new Card(j, SuitType.Clubs);
         deck[i++] = new Card(j, SuitType.Diamonds);
         deck[i++] = new Card(j, SuitType.Hearts);
         deck[i++] = new Card(j, SuitType.Spades);
     }
 }
Beispiel #3
0
        public Card GetCard()
        {
            Card c = null;
            for (int i = 0; i < deck.Length; ++i)
                if (deck[i] != null)
                {
                    c = new Card(deck[i].Denomination, deck[i].Suit);
                    deck[i] = null;
                    break;
                }

            return c;
        }