Example #1
0
 public void AddDeck(ArchetypeDeck deck)
 {
     // Skip duplicate decks
     if (!_archetypes.Any(x => x.Matches(deck)))
     {
         _archetypes.Add(deck);
     }
 }
Example #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));
            }
        }
Example #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));
        }