示例#1
0
        /// <summary>
        /// Temporarily stores the card, adds it to the discard pile, removes the real card object from the deck pile and
        /// returns the card
        /// </summary>
        /// <returns></returns>
        public T DrawNextCard()
        {
            T card = DeckPile[Count - 1];

            DiscardPile.Add(card);
            DeckPile.RemoveAt(Count - 1);

            if (Count == 0)
            {
                ReShuffleDeck();
            }
            return(card);
        }