float KillSome() { float deaths = 0; for (int i = 0; i < ageDistribution.GetPointCount(); i++) { float loss = GetLossOfPeopleOfAge(ageDistribution.GetValue(i), i); ageDistribution.GhostChangePoint(i, ageDistribution.GetValue(i) - loss); deaths += loss; } ageDistribution.UpdateBiggestYValue(); return(deaths); }
public void ClearHistory() { int lowestPoint = populationLine.GetPointCount() / 2; populationLine.RemovePointsBefore(lowestPoint); populationChart.AddXTranslation(lowestPoint); populationChart.ResetScale(); populationChart.QueueDraw(); birthRate.RemovePointsBefore(lowestPoint); deathRate.RemovePointsBefore(lowestPoint); rateChart.AddXTranslation(lowestPoint); rateChart.ResetScale(); rateChart.QueueDraw(); }