Exemplo n.º 1
0
        public void TickForward()
        {
            money.CalculateTax();
            // Calculations should be done before actually manipulating the data
            // so no weird side effects happen
            // Order should be kept: healing -> internal transmission -> travel
            regions.ForEach(x => {
                x.population.ForEach(p => p.PerformInternalChanges());
                x.PerformInternalTransmission();
                x.PerformInternalFlowChange();
                x.PerformTravel();
            });

            regions.ForEach(x =>
            {
                x.UpdateTotalPopulation();
            });

            happiness.CalculateHappiness();
            statistics.Calculate();
            graphics.UpdateGraphics();
            Day++;
        }