public void Shuffle() { Random rnd = new Random(); int n = allPlayingCards.Count; while (n > 1) { n--; int k = rnd.Next(n + 1); PlayingCard randomCard = allPlayingCards[k]; allPlayingCards[k] = allPlayingCards[n]; allPlayingCards[n] = randomCard; } }
public void AddCard(PlayingCard card) { cards.Add(card); }