Replace selectable name sets with a country that owns names and climate presets.

Create picks a country; climate is rolled from the school seed and stored. Old Slavic saves lift as Russia.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 02:55:13 +03:00
co-authored by Cursor
parent 450495f666
commit 1b66c89cd7
58 changed files with 902 additions and 477 deletions
@@ -14,11 +14,11 @@ public class PeopleInSchoolTests
{
var (catalog, map) = Vanilla();
var demand = SchoolDemand.From(catalog, map);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Slavic", Start);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Slavic", Start);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Russia", Start);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Russia", Start);
using var school = School.Create(1, "Полная", Start, catalog, map);
school.InstallPeople(roster, seed: 1, "Slavic", pool);
school.InstallPeople(roster, seed: 1, "Russia", pool);
school.Tick(1d / 20d, 5d);
Assert.Same(roster, school.Roster);
@@ -39,11 +39,11 @@ public class PeopleInSchoolTests
{
var start = new DateTime(2012, 3, 31, 6, 0, 0, DateTimeKind.Utc);
var (catalog, map) = Vanilla();
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Slavic", start);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Slavic", start);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Russia", start);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Russia", start);
using var school = School.Create(1, "Неделя", start, catalog, map);
school.InstallPeople(roster, seed: 1, "Slavic", pool);
school.InstallPeople(roster, seed: 1, "Russia", pool);
var monday = new DateTime(2012, 4, 2, 6, 0, 0, DateTimeKind.Utc);
var changed = school.Tick((monday - start).TotalMinutes / 5d, 5d);
@@ -60,7 +60,7 @@ public class PeopleInSchoolTests
public void OffCampusNeeds_DoNotMoveOnTick()
{
var (catalog, map) = Vanilla();
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 2, "Slavic", Start);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 2, "Russia", Start);
using var school = School.Create(2, "Нужды", Start, catalog, map);
school.InstallPeople(roster, seed: 2);
@@ -108,8 +108,8 @@ public class PeopleInSchoolTests
public void SameSeed_InstallsTheSameNames()
{
var (catalog, map) = Vanilla();
var first = RosterGenerator.Generate(catalog, map, schoolSeed: 9, "Slavic", Start);
var second = RosterGenerator.Generate(catalog, map, schoolSeed: 9, "Slavic", Start);
var first = RosterGenerator.Generate(catalog, map, schoolSeed: 9, "Russia", Start);
var second = RosterGenerator.Generate(catalog, map, schoolSeed: 9, "Russia", Start);
using var a = School.Create(9, "А", Start, catalog, map);
using var b = School.Create(9, "Б", Start, catalog, map);
@@ -126,7 +126,7 @@ public class PeopleInSchoolTests
{
var catalog = Catalog();
var map = Classrooms(4);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Slavic", Start);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Russia", Start);
var demand = SchoolDemand.From(catalog, map);
var oldest = roster.Classes.Max(schoolClass => schoolClass.Year);
var graduated = roster.Classes
@@ -135,7 +135,7 @@ public class PeopleInSchoolTests
.ToHashSet(StringComparer.Ordinal);
using var school = School.Create(1, "Четыре кабинета", Start, catalog, map);
school.InstallPeople(roster, seed: 1, "Slavic");
school.InstallPeople(roster, seed: 1, "Russia");
var sept = new DateTime(2012, 9, 1, 0, 0, 0, DateTimeKind.Utc);
var changed = school.Tick((sept - Start).TotalMinutes / 5d, 5d);
@@ -160,9 +160,9 @@ public class PeopleInSchoolTests
var start = new DateTime(2012, 9, 1, 6, 0, 0, DateTimeKind.Utc);
var catalog = Catalog();
var map = Classrooms(4);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 3, "Slavic", start);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 3, "Russia", start);
using var school = School.Create(3, "Первое сентября", start, catalog, map);
school.InstallPeople(roster, seed: 3, "Slavic");
school.InstallPeople(roster, seed: 3, "Russia");
var years = roster.Classes.Select(schoolClass => schoolClass.Year).OrderBy(year => year).ToArray();
var changed = school.Tick(1d / 20d, 5d);