Files
h-school/tests/HSchool.Ai.Tests/LessonLearningTests.cs
T
Leonid Pershin 5cd5a6d258
ci / server (push) Failing after 3m40s
ci / client (push) Successful in 14s
Update decision-making phase and enhance localization for presence tracking
- Marked tasks as complete in the decision-making phase documentation, indicating readiness for implementation.
- Updated the README to reflect the completion status of the decision-making phase.
- Enhanced localization strings to include new presence tracking features, improving user experience.
- Revised the game screen logic to display real-time presence status, including walking states for individuals.
- Added tests to validate the new localization strings and presence functionalities, ensuring robust performance.
2026-08-19 21:00:12 +03:00

33 lines
939 B
C#

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);
}
}