Esempio n. 1
0
 /// <summary>
 ///  Create a new state object to represent an organism.
 /// </summary>
 /// <param name="id">The GUID ID representing this organism in the world.</param>
 /// <param name="species">The species which defines the basic properties of the organism.</param>
 /// <param name="generation">The familial generation number.</param>
 /// <param name="initialEnergyState">The initial EnergyState of the organism.</param>
 /// <param name="initialRadius">The initial Radius of the organism.</param>
 internal OrganismState(string id, ISpecies species, int generation, EnergyState initialEnergyState, int initialRadius)
 {
     DeathReason = PopulationChangeReason.NotDead;
     ID          = id;
     Species     = species;
     Generation  = generation;
     SetStoredEnergyInternal(OrganismState.UpperBoundaryForEnergyState(species, initialEnergyState, initialRadius));
     Radius = initialRadius;
     events = new OrganismEventResults();
 }
 /// <summary>
 ///  Create a new state object to represent an organism.
 /// </summary>
 /// <param name="id">The GUID ID representing this organism in the world.</param>
 /// <param name="species">The species which defines the basic properties of the organism.</param>
 /// <param name="generation">The familial generation number.</param>
 internal OrganismState(string id, ISpecies species, int generation)
 {
     this.organismID = id;
     this.species = species;
     this.generation = generation;
     this.events = new OrganismEventResults();
 }
Esempio n. 3
0
 /// <summary>
 ///  Create a new state object to represent an organism.
 /// </summary>
 /// <param name="id">The GUID ID representing this organism in the world.</param>
 /// <param name="species">The species which defines the basic properties of the organism.</param>
 /// <param name="generation">The familial generation number.</param>
 /// <param name="initialEnergyState">The initial EnergyState of the organism.</param>
 /// <param name="initialRadius">The initial Radius of the organism.</param>
 internal OrganismState(string id, ISpecies species, int generation, EnergyState initialEnergyState, int initialRadius)
 {
     DeathReason = PopulationChangeReason.NotDead;
     ID = id;
     Species = species;
     Generation = generation;
     SetStoredEnergyInternal(OrganismState.UpperBoundaryForEnergyState(species, initialEnergyState, initialRadius));
     Radius = initialRadius;
     events = new OrganismEventResults();
 }