public SingleSimulationResults(DayStepResult <CreatureListDTO> creatureResults, DayStepResult <Terrain> terrainResults,
                                DayStepResult <List <int> > populationResults, bool logOnlyPopulation)
 {
     CreatureResults    = creatureResults;
     TerrainResults     = terrainResults;
     PopulationResults  = populationResults;
     _logOnlyPopulation = logOnlyPopulation;
 }
Esempio n. 2
0
        public Simulation(Terrain simulationTerrain, int simulationDays, int stepsPerDay,
                          Population initialPopulation, int foodToSurvive, int foodToReproduce, bool logOnlyPopulation)
        {
            CurrentTerrain = simulationTerrain;

            _simulationDays = simulationDays;
            _stepsPerDay    = stepsPerDay;
            FoodToSurvive   = foodToSurvive;
            FoodToReproduce = foodToReproduce;

            _logOnlyPopulation = logOnlyPopulation;

            _initialPopulation = initialPopulation;
            CurrentPopulation  = new Population(_initialPopulation);

            if (!_logOnlyPopulation)
            {
                CreatureResults = new DayStepResult <CreatureListDTO>();
                TerrainResults  = new DayStepResult <Terrain>();
            }

            PopulationResults = new DayStepResult <List <int> >();
        }
Esempio n. 3
0
 public DayStepResult(DayStepResult <T> source)
 {
     results = source.results.ConvertAll(result => new List <T>(result));
 }