Landis.Extension.BaseHarvest.Prescription.ISpeciesCohortsDisturbance C# (CSharp) Method

ISpeciesCohortsDisturbance() private method

private ISpeciesCohortsDisturbance ( ISpeciesCohorts cohorts, ISpeciesCohortBoolArray isDamaged ) : void
cohorts ISpeciesCohorts
isDamaged ISpeciesCohortBoolArray
return void
        void ISpeciesCohortsDisturbance.MarkCohortsForDeath(ISpeciesCohorts cohorts,
                                                         ISpeciesCohortBoolArray isDamaged)
        {
            cohortSelector.Harvest(cohorts, isDamaged);

            int cohortsDamaged = 0;
            for (int i = 0; i < isDamaged.Count; i++) {
                if (isDamaged[i]) {
                    
                    //if this cohort is killed, update the damage table (for the stand of this site) with this species name
                    SiteVars.Stand[currentSite].UpdateDamageTable(cohorts.Species.Name);
                    //PlugIn.ModelCore.UI.WriteLine("Damaged:  {0}.", cohorts.Species.Name);
                    
                    //and increment the cohortsDamaged
                    cohortsDamaged++;
                }
            }
            SiteVars.CohortsDamaged[currentSite] += cohortsDamaged;
        }
    }