Ejemplo n.º 1
0
            public StrategyBuilder Append <T>(Action <T> configureStrategy = null, Func <GameState, bool> predicate = null, Action <GameState, bool, bool> callback = null)
                where T : TurnStrategyBase, new()
            {
                var strategy = new T();

                strategy._parent        = _current;
                strategy._predicate     = predicate;
                strategy._callback      = callback;
                strategy._loggerFactory = _loggerFactory;
                strategy.Logger         = _loggerFactory.CreateLogger <T>();

                configureStrategy?.Invoke(strategy);
                _current = strategy;
                return(this);
            }
 public MaintenanceWhenBuildingIsGettingDamagedTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
Ejemplo n.º 3
0
 protected TurnStrategyBase(TurnStrategyBase parent = null)
 {
     _parent = parent;
 }
 public BuildBuildingWhenCloseToPopMaxTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
Ejemplo n.º 5
0
 public BuildWhenHasBuildingsUnderConstructionTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
Ejemplo n.º 6
0
 public BuildUtilityCloseToResidencesTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
 public AdjustBuildingTemperaturesTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
Ejemplo n.º 8
0
 public BuyUpgradeTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
Ejemplo n.º 9
0
 public SingletonBuildingTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }
Ejemplo n.º 10
0
 public BuildCabinsWhenNoOtherActionsThanWaitTurnStrategy(TurnStrategyBase parent) : base(parent)
 {
 }