public bool PushEvent(MTGEvent mtgEvent) { string indentstr = ""; for (int i = 0; i < indent; i++) { indentstr += " : "; } Console.WriteLine($"{indentstr}{mtgEvent.GetType().Name} pushed"); indent++; var result = mtgEvent.Apply(); indent--; Console.WriteLine($"{indentstr}{mtgEvent.GetType().Name} resolved"); return(result); }
public IEnumerable <TriggeredAbilityEntry> TriggeredAbilities(MTGEvent mtgevent) { Type type = mtgevent.GetType(); if (_allTriggeredAbilities.TryGetValue(type, out var abilities)) { foreach (var ability in abilities) { yield return(ability); } } }