public void ResolvePrerequisites(CardStorage cardStorage) { unsatisfiedPrerequisites = new Dictionary <ICard, ICardPrerequisite>(); foreach (ICardPrerequisite prerequisite in prerequisites) { ICard card = prerequisite.GetCard(cardStorage); if (card != null && (card.Progress.Status & prerequisite.Status) != prerequisite.Status && !unsatisfiedPrerequisites.ContainsKey(card)) { unsatisfiedPrerequisites.Add(card, prerequisite); card.AddDependentCard(this); } } }