Esempio n. 1
0
        public BaseCard TakeTopCard()
        {
            BaseCard card = null;

            if (Cards.Count > 0)
            {
                card = Cards[Cards.Count - 1];
                Cards.RemoveAt(Cards.Count - 1);
                card.RemoveHighlight();
            }

            return(card);
        }
Esempio n. 2
0
        public BaseCard TakeTopCard()
        {
            BaseCard card = null;

            if (this.Cards.Count > 0)
            {
                card = this.Cards[this.Cards.Count - 1];
                this.Cards.RemoveAt(this.Cards.Count - 1);
                card.RemoveHighlight();
            }

            if (this.Cards.Count <= 0)
            {
                this.GameOver(); //TODO: call OnDeckIsOutOfCards event here
            }

            return(card);
        }