internal DeckStats Add(Deck deck) { var ds = new DeckStats(deck); Instance.DeckStats.TryAdd(deck.DeckId, ds); return(ds); }
public DeckStats GetDeckStats(string hero) { if (string.IsNullOrEmpty(hero)) { return(null); } var ds = DeckStats.FirstOrDefault(d => d.Name == hero); if (ds != null) { return(ds); } ds = new DeckStats { Name = hero }; DeckStats.Add(ds); return(ds); }
public void RemoveDeck(DeckStats deck) => RemoveDeck(deck.DeckId);