예제 #1
0
        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;
            }
        }
예제 #2
0
 public void AddCard(PlayingCard card)
 {
     cards.Add(card);
 }