Grow lesson skills only when the assigned teacher is standing in the room.
The timetable already named a teacher; learning ignored whether they were in the toilet, still walking, or not a person at all. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -195,13 +195,18 @@ public class DecisionTests
|
||||
{
|
||||
var roster = RosterGenerator.Generate(catalog, map, seed, "Russia", TuesdayMorning);
|
||||
var pool = ApplicantPool.Create(catalog, roster, seed, "Russia", TuesdayMorning);
|
||||
var hired = Staffing.Hire(catalog, map, roster, pool, pool.Applicants[0].Person.Id, Staffing.TeacherPosition, 1_000_000f);
|
||||
Assert.Equal(StaffingError.None, hired.Error);
|
||||
roster = hired.Roster;
|
||||
pool = hired.Pool;
|
||||
var teacherId = roster.People.First(person => person.IsStaff).Id;
|
||||
var schoolClass = roster.Classes.First(row =>
|
||||
row.RoomId is "classroom-101" or "classroom-102" or "classroom-103" or "classroom-104");
|
||||
var school = School.Create(seed, "Решения", TuesdayMorning, catalog, map);
|
||||
school.InstallPeople(roster, seed, "Russia", pool);
|
||||
school.SetTimetable(new Timetable(
|
||||
[
|
||||
new LessonPlacement(schoolClass.Id, "Mathematics", "t1", schoolClass.RoomId, Day: 1, Period: 1),
|
||||
new LessonPlacement(schoolClass.Id, "Mathematics", teacherId, schoolClass.RoomId, Day: 1, Period: 1),
|
||||
new LessonPlacement(schoolClass.Id, "PhysicalEducation", "t2", "gym-hall", Day: 1, Period: 2),
|
||||
],
|
||||
[]));
|
||||
|
||||
Reference in New Issue
Block a user