示例#1
0
        internal DeckStats Add(Deck deck)
        {
            var ds = new DeckStats(deck);

            Instance.DeckStats.TryAdd(deck.DeckId, ds);
            return(ds);
        }
示例#2
0
        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);