예제 #1
0
파일: Deck.cs 프로젝트: Areax/TerrasNaxium
        public BaseCard TakeTopCard()
        {
            BaseCard card = null;

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

            return(card);
        }
예제 #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);
        }