public void YatesShuffle() { Random rng = new Random((int)DateTime.Now.Ticks); shuffledDeck.Clear(); shuffledDeck.AddRange(cards); for (int n = shuffledDeck.Count - 1; n > 0; --n) { int k = rng.Next(n + 1); PlayingCard temp = shuffledDeck[n]; shuffledDeck[n] = shuffledDeck[k]; shuffledDeck[k] = temp; } }
public void ReceiveCard(PlayingCard card) { cards.Add(card); }