public ResponseResult ExecuteSimulation() { var creator = new StrategyCreator(_context); var strategy = creator.FactoryMethod(Country, Region, Strategy, ParametersDictionary); var responseResult = strategy.Execute(); // TODO: log to DB here result parameters logger.Info("End of Simulation"); return(responseResult); }
public override IShootStrategy GetShootStrategy() { var playerInputStrategy = View.GetStrategyInput(); StrategyCreator strategyCreator = playerInputStrategy switch { PlayerInputStrategy.Random => new ShootStrategyRandomCreator(), PlayerInputStrategy.AtPoint => new ShootStrategyAtPointCreator(View.GetPointInput()), _ => throw new ArgumentOutOfRangeException() }; return(strategyCreator?.FactoryMethod()); }