示例#1
0
        public void Shuffle()
        {
            int firstCard;
            int secondCard;

            Card tempCard;

            for (int card = 0; card < this.Count; card++)
            {
                firstCard  = this.Random.Next(0, this.Count);
                secondCard = this.Random.Next(0, this.Count);

                tempCard = (Card)this[secondCard].Clone();

                Card.OverWrite(this[secondCard], this[firstCard]);
                Card.OverWrite(this[firstCard], tempCard);
            }
        }