コード例 #1
0
ファイル: Enviroment.cs プロジェクト: Wisetorsk/BioSimCSharp
        public int ResetMigrationParameter()
        {
            var migrations = Carnivores.Where(i => i.Migrated).Count() + Herbivores.Where(i => i.Migrated).Count();

            Carnivores.ForEach(i => i.Migrated = false);
            Herbivores.ForEach(i => i.Migrated = false);
            return(migrations);
        }
コード例 #2
0
ファイル: Enviroment.cs プロジェクト: Wisetorsk/BioSimCSharp
        public int ResetGivenBirthParameter()
        {
            var births = Carnivores.Where(i => i.GivenBirth).Count() + Herbivores.Where(i => i.GivenBirth).Count();

            Carnivores.ForEach(i => i.GivenBirth = false);
            Herbivores.ForEach(i => i.GivenBirth = false);
            return(births);
        }
コード例 #3
0
ファイル: Enviroment.cs プロジェクト: Wisetorsk/BioSimCSharp
 public void OverloadAllCarnivores(CarnivoreParams parameters)
 {
     // Implement parameter cloning!!!
     Carnivores.ForEach(i => i.Params = parameters);
 }
コード例 #4
0
ファイル: Enviroment.cs プロジェクト: Wisetorsk/BioSimCSharp
 public void WeightLossCycle()
 {
     Herbivores.ForEach(i => i.UpdateWeight());
     Carnivores.ForEach(i => i.UpdateWeight());
 }
コード例 #5
0
ファイル: Enviroment.cs プロジェクト: Wisetorsk/BioSimCSharp
 public void AgeCycle()
 {
     Herbivores.ForEach(i => i.GrowOlder());
     Carnivores.ForEach(i => i.GrowOlder());
 }
コード例 #6
0
ファイル: Enviroment.cs プロジェクト: Wisetorsk/BioSimCSharp
 public void DeathCycle()
 {
     Carnivores.ForEach(i => i.Death());
     Herbivores.ForEach(i => i.Death());
 }