Ejemplo n.º 1
0
 public TimeManager(
     IOutputDevice outputDevice,
     ISimulationManager simulationManager)
 {
     this.outputDevice      = outputDevice;
     this.simulationManager = simulationManager;
 }
Ejemplo n.º 2
0
        public OverlayController(UiStateModel uiState,
                                 ISimulationManager simulationManager,
                                 ISimulationState simulationState,
                                 IIndicatorProvider indicatorProvider,
                                 StatusBar statusBar)
        {
            _uiState = uiState ?? throw new ArgumentNullException(nameof(uiState));
            if (simulationManager == null)
            {
                throw new ArgumentNullException(nameof(simulationManager));
            }
            if (simulationState == null)
            {
                throw new ArgumentNullException(nameof(simulationState));
            }
            if (indicatorProvider == null)
            {
                throw new ArgumentNullException(nameof(indicatorProvider));
            }
            _statusBar = statusBar ?? throw new ArgumentNullException(nameof(statusBar));

            _executeEventArgs = new ExecuteEventArgs()
            {
                Manager = simulationManager,
                Sim     = simulationState,
            };

            _updateReadinessEventArgs = new UpdateReadinessEventArgs
            {
                Sim = simulationState,
            };

            _lastHover          = HexCoords.CreateFromOffset(-1, -1);
            _hoverTileIndicator = indicatorProvider.GetIndicator("HoverTileIndicator");
        }
Ejemplo n.º 3
0
        public Population(ISimulationManager man, IInsuranceSocialSystem i)
        {
            Citizens = new List<Citizen>();
            LivingCitizens = new List<Citizen>();
            DeadCitizens = new List<Citizen>();

            Manager = man;
            iss = i;

            AgeOfMajority = new Age(18, 0);
            StandardRetirementAge = new Age(65, 0);
            AverageAgeOfDying = new Age(85, 0);
            BornRate = 1;
        }
        public void InitialiseManager(string simulationType)
        {
            switch (simulationType.ToLower())
            {
            case "rebalance":
                SimulationManager = _container.Resolve <IRebalanceSimulationManager>();
                break;

            case "buyandhold":
                SimulationManager = _container.Resolve <IBuyAndHoldSimulationManager>();
                break;

            default:
                throw new NotImplementedException("Unknown simulation type requested.");
            }
        }
Ejemplo n.º 5
0
 public UpdateEventArgs(ISimulationManager simulationManager, ISimulationState sim)
 {
     Manager = simulationManager ?? throw new ArgumentNullException(nameof(simulationManager));
     Sim     = sim ?? throw new ArgumentNullException(nameof(sim));
 }
Ejemplo n.º 6
0
 public MapLoader(IConfig config, IIndicatorProvider indicatorProvider, ISimulationManager simulationManager)
 {
     _config            = config ?? throw new ArgumentNullException(nameof(config));
     _indicatorProvider = indicatorProvider ?? throw new ArgumentNullException(nameof(indicatorProvider));
     _simulationManager = simulationManager ?? throw new ArgumentNullException(nameof(simulationManager));
 }