Dominion.ListOfCards.FindAndRemoveCardOrderDestroyed C# (CSharp) Method

FindAndRemoveCardOrderDestroyed() public method

public FindAndRemoveCardOrderDestroyed ( Dominion.Card card ) : Dominion.Card
card Dominion.Card
return Dominion.Card
        public Card FindAndRemoveCardOrderDestroyed(Card card)
        {
            if (this.countKnownCard > 0)
                throw new System.Exception("not sure what to do with known cards");

            int cardIndex = FindCardIndex(card);
            if (cardIndex == -1)
                throw new System.Exception("couldnt find card");

            this.MoveCardToEnd(cardIndex);

            return this.DrawCardFromTop();
        }