using HSchool.Content; namespace HSchool.Ai.Tests; public class LessonLearningTests { private static readonly SkillDef Math = new() { DefName = "Mathematics", Range = new IntRange { Min = 0, Max = 100 }, }; [Fact] public void HungryLearnsLessThanFull() { var full = LessonLearning.Gain(50, Math, share: 1, lessonSkillPerHour: 0.05f, hours: 0.75f, hunger: 1f, traitOffset: 0); var hungry = LessonLearning.Gain(50, Math, share: 1, lessonSkillPerHour: 0.05f, hours: 0.75f, hunger: 0.1f, traitOffset: 0); Assert.True(full > 50); Assert.True(hungry > 50); Assert.True(full - 50 > hungry - 50); } [Fact] public void DiligentOffset_RaisesTheGain() { var plain = LessonLearning.Gain(50, Math, 1, 0.05f, 1f, 1f, 0); var diligent = LessonLearning.Gain(50, Math, 1, 0.05f, 1f, 1f, 8); Assert.True(diligent > plain); } }