diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 11:52:35 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 11:52:35 +0800 |
| commit | b2a67011ca7eef02c685794d887804e7e50dadf8 (patch) | |
| tree | fe9b3d02391cd0baf991c144cab4b589b942f7a1 /src/LivingVillage.Desktop.Tests/MapGenTests.fs | |
| parent | 38496525403cefcbfefedcf8377100e662d9e6d4 (diff) | |
| parent | ecb96a9626b3c5583a995f78b99d6db43ab2dd5b (diff) | |
| download | living-village-b2a67011ca7eef02c685794d887804e7e50dadf8.tar.gz | |
merge: P28 民居第二变体强化 + 512 沿河加密(青灰挑檐B/竖长格栅窗/绿院门,2/3/4 宽分层 16 座外环)— Hermes 复验通过
Diffstat (limited to 'src/LivingVillage.Desktop.Tests/MapGenTests.fs')
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/MapGenTests.fs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop.Tests/MapGenTests.fs b/src/LivingVillage.Desktop.Tests/MapGenTests.fs index 6486dd7..b737707 100644 --- a/src/LivingVillage.Desktop.Tests/MapGenTests.fs +++ b/src/LivingVillage.Desktop.Tests/MapGenTests.fs @@ -256,6 +256,21 @@ type MapGenTests () = Assert.IsTrue(a.Buildings = b.Buildings) Assert.AreEqual<string>(MapGen.serialize a, MapGen.serialize b) + /// P28:512 沿河民居由 10 -> 16 增密(+6),并出现 2/3/4 三档宽度(附属小筑/民居/大宅), + /// 形成聚落层次;默认图仍为 0,不消耗 RNG,故 64/256 checksum 锁定不变。 + [<TestMethod>] + member _.LargeMapHouseDensityHierarchyOnlyGrowsLargeMaps () = + Assert.AreEqual<int>(16, (MapGen.paramsForSize 512 384 (uint64 1)).ExtraRiversideHouses) + Assert.AreEqual<int>(0, (MapGen.paramsForSize 64 48 (uint64 1)).ExtraRiversideHouses) + Assert.AreEqual<int>(0, (MapGen.paramsForSize 256 192 (uint64 1)).ExtraRiversideHouses) + let map = MapGen.generateWithSize 512 384 (uint64 4242) + Assert.IsTrue(map.Buildings.Length >= 22, sprintf "P28 512 must place >=22 houses, saw %d" map.Buildings.Length) + let widths = map.Buildings |> List.map (fun b -> b.Width) |> Set.ofList + Assert.IsTrue(widths.Contains 2, "outbuilding width 2 must appear") + Assert.IsTrue(widths.Contains 3, "house width 3 must appear") + Assert.IsTrue(widths.Contains 4, "hall width 4 must appear") + Assert.AreEqual<int>(24, map.Buildings.Length) + [<TestMethod>] member _.DefaultSizeHouseCountUnchanged () = Assert.AreEqual<int>(4, (MapGen.generateWithSize 64 48 (uint64 4242)).Buildings.Length) |
