public static Zone <Unit> GetZone(this UnitZone unitZone, GameState gameState) { return(unitZone switch { UnitZone.Battlefield => gameState.Battlefield, UnitZone.Graveyard => gameState.Graveyard, _ => throw new Exception($"Unrecognized UnitZone: {unitZone}"), });
public override IEnumerable <ITarget> GetOptions(Unit source, GameState gameState) { return(UnitZone.GetZone(gameState) .Where(Selfness.Getter(source)) .Where(Relation.Getter(source))); }