public SavedDiscardPile <D> GetSavedPile() { SavedDiscardPile <D> output = new SavedDiscardPile <D>(); output.CurrentCard = CurrentCard; output.PileList = _objectList.ToRegularDeckDict(); return(output); }
public void SavedDiscardPiles(SavedDiscardPile <D> save) { _objectList.Clear(); if (save.PileList.Count == 0 && save.CurrentCard.Deck == 0) { CurrentCard = new D(); return; } CurrentCard = save.CurrentCard; _objectList.ReplaceRange(save.PileList); _previousNum = _objectList.Count; }