public GameController() { _player = new Player(); _earth = new Earth(); _eventGenerator = new EventGenerator(_earth); _activeEvents = new List <IEvent>(); _randomizer = new Random(); _eventGenerationChance = 0.35; //Each month, 2x(35% chance of generating a new event) _initialPopulation = _earth.Population; _halfPopulation = (long)((double)_initialPopulation / (double)2); _initialGDP = _earth.GDP; _halfGDP = (_initialGDP / (decimal)4); _initialYear = _earth.Year; _initialMonth = _earth.CurrentMonth; _initialTemperature = _earth.Temp; _initialCo2Con = _earth.Co2Con; _initialSeaLevel = _earth.SeaLevel; }
public EventGenerator(Earth _earth) { _remainingEvents = new List <IEvent>(); //Add each possible event _remainingEvents.Add(new EventPolarBears(_earth)); _remainingEvents.Add(new EventGeoengAtmosphere(_earth)); _remainingEvents.Add(new EventInsectOutbreak(_earth)); _remainingEvents.Add(new EventPopulationExplosion(_earth)); _remainingEvents.Add(new EventSolarTechImprovement(_earth)); _remainingEvents.Add(new EventWildFires(_earth)); _remainingEvents.Add(new EventCoralReefDestruction(_earth)); _remainingEvents.Add(new EventThoriumPower(_earth)); _remainingEvents.Add(new EventEconomicCrisis(_earth)); _remainingEvents.Add(new EventHurricanes(_earth)); _remainingEvents.Add(new EventDeforestation(_earth)); //... _randomizer = new Random(); }
public EventHurricanes(Earth earth) { _earth = earth; }
public EventCoralReefDestruction(Earth earth) { _earth = earth; }
public EventPopulationExplosion(Earth earth) { _earth = earth; }
public EventPolarBears(Earth earth) { _earth = earth; }
public EventWildFires(Earth earth) { _earth = earth; }
public EventEconomicCrisis(Earth earth) { _earth = earth; }
public EventGeoengAtmosphere(Earth earth) { _earth = earth; }
public EventSolarTechImprovement(Earth earth) { _earth = earth; }
public EventInsectOutbreak(Earth earth) { _earth = earth; }
public EventThoriumPower(Earth earth) { _earth = earth; }
public EventDeforestation(Earth earth) { _earth = earth; }