예제 #1
0
 private void InitCards()
 {
     for (int i = 0; i < 4; i++)
     {
         for (int j = 2; j <= 14; j++)
         {
             PlayingCard card = new PlayingCard(j, (CardSuit)i);
             allPlayingCards.Add(card);
         }
     }
 }
예제 #2
0
 public void StartNewGame()
 {
     deck.Shuffle();
     while (deck.allPlayingCards.Count != 0)
     {
         PlayingCard card1 = deck.allPlayingCards[0];
         deck.allPlayingCards.Remove(deck.allPlayingCards[0]);
         PlayingCard card2 = deck.allPlayingCards[0];
         deck.allPlayingCards.Remove(deck.allPlayingCards[0]);
         player1.AddCard(card1);
         player2.AddCard(card2);
     }
 }
예제 #3
0
 public void AddCard(PlayingCard card)
 {
     cards.Add(card);
 }