Exemple #1
0
 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}"),
     });
Exemple #2
0
 public override IEnumerable <ITarget> GetOptions(Unit source, GameState gameState)
 {
     return(UnitZone.GetZone(gameState)
            .Where(Selfness.Getter(source))
            .Where(Relation.Getter(source)));
 }