Пример #1
0
 public void AddDeck(ArchetypeDeck deck)
 {
     // Skip duplicate decks
     if (!_archetypes.Any(x => x.Matches(deck)))
     {
         _archetypes.Add(deck);
     }
 }
Пример #2
0
        public void RemoveDeck(ArchetypeDeck deck)
        {
            // Remove actual deck
            var success = _archetypes.Remove(deck);

            // else remove matching decks
            if (!success)
            {
                _archetypes.RemoveAll(x => x.Matches(deck));
            }
        }
Пример #3
0
        public ArchetypeDeck GetDeck(object obj)
        {
            if (obj == null)
            {
                return(null);
            }

            ArchetypeDeck d = obj as ArchetypeDeck;

            if (d == null)
            {
                return(null);
            }

            return(GetDeck(d.Id));
        }