public void AddRestOfDeck(IDeckDict <D> currentList) { if (currentList.ObjectExist(_objectList.First().Deck)) { _objectList.RemoveFirstItem(); //try to remove the first item. hopefully does not cause another issue. } _objectList.AddRange(currentList); _previousNum = _objectList.Count; // so far should be fine }
public D DrawCard() { if (_objectList.Count == 0) { throw new BasicBlankException("Cannot draw a card because there are no more cards left"); } D thisCard; thisCard = _objectList.First(); _objectList.RemoveFirstItem(); thisCard.IsUnknown = false; return(thisCard); }