protected FeatureEvolution( Range <PersonAge> ageRange, FeatureImprovementRatio maxImprovement, EvolutionCurve evolutionCurve) { AgeRange = ageRange; MaxFeatureImprovement = maxImprovement; EvolutionCurve = evolutionCurve; }
public AgeRating ImproveRatingFromAge(AgeRating currentAgeRating, Duration evolutionDuration) { if (currentAgeRating is null) { throw new ArgumentNullException(nameof(currentAgeRating)); } if (evolutionDuration is null) { throw new ArgumentNullException(nameof(evolutionDuration)); } // on ajoute la durée à l'âge du joueur (PersonAge + Duration = PersonAge) PersonAge futureAge = currentAgeRating.Age + evolutionDuration; FeatureImprovementRatio improvement = GetImprovementFromAge(futureAge) - GetImprovementFromAge(currentAgeRating.Age); return(new AgeRating(futureAge, improvement.ImproveRating(currentAgeRating.Rating))); }
private Phase3Evolution(Range <PersonAge> ageRange, FeatureImprovementRatio maxImprovement, EvolutionCurve evolutionCurve) : base(ageRange, maxImprovement, evolutionCurve) { }