public Card GetNextCard() { if (this.cardIndex == 0) { throw new InternalGameException("Deck is empty!"); } this.cardIndex--; var card = this.listOfCards[this.cardIndex]; return card; }
public void GetNextCardShouldThrowExceptionWhenCalled53Times() { IDeck deck = new Deck(); for (var i = 0; i < 53; i++) { deck.GetNextCard(); } }