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); } } }
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); } }
public void AddCard(PlayingCard card) { cards.Add(card); }