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;
 }
Exemple #2
0
        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;
 }
Exemple #4
0
 public EventCoralReefDestruction(Earth earth)
 {
     _earth = earth;
 }
Exemple #5
0
 public EventPopulationExplosion(Earth earth)
 {
     _earth = earth;
 }
Exemple #6
0
 public EventPolarBears(Earth earth)
 {
     _earth = earth;
 }
 public EventWildFires(Earth earth)
 {
     _earth = earth;
 }
Exemple #8
0
 public EventEconomicCrisis(Earth earth)
 {
     _earth = earth;
 }
Exemple #9
0
 public EventGeoengAtmosphere(Earth earth)
 {
     _earth = earth;
 }
Exemple #10
0
 public EventSolarTechImprovement(Earth earth)
 {
     _earth = earth;
 }
Exemple #11
0
 public EventInsectOutbreak(Earth earth)
 {
     _earth = earth;
 }
Exemple #12
0
 public EventThoriumPower(Earth earth)
 {
     _earth = earth;
 }
 public EventDeforestation(Earth earth)
 {
     _earth = earth;
 }