summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Kernel.Tests/M6aTests.fs
Commit message (Collapse)AuthorAgeFilesLines
* test(kernel): 512x384 参数化边界存档 round-trip 与 NPC ↵Somhairle H. Marisol13 days1-0/+26
| | | | | | | | | 边界回归(P23) - Sim.configureBounds 512 384 下 v2 存档 round-trip 且同 world 两次保存逐字节一致, 读回再保存仍与原文一致;v1 的 64x48 兼容由既有用例覆盖。 - DriverHarness 长跑 20000 tick 断言 avatar 与全部 NPC 有限且留在 [0,max] 内。 - Kernel 测试 90 -> 92。
* feat(mapgen): 参数化确定性生成器与视口裁剪(P20 第一步)Somhairle H. Marisol13 days1-0/+22
| | | | | | | | | | - 新增纯函数 MapGen:尺寸参数化(默认 64x48,可 256x192),splitmix64 随机游走河道 + 2-3 octave value noise + 泊松式布点;核心区整平后以 BFS 校验 5x6=30 个 spawn 全部可达,不可达确定性修整并复验。 - visibleTileRange/visibleTileCount 纯函数,drawWorld 改为调用之(行为不变); drawMapFitted/drawMapViewport 仅证据用。 - 存档沿用 v2/v3 边界字段,补参数化边界 round-trip 测试,未改 Sim 语义。 - 回归:Desktop 109->115、Kernel 89->90;final_digest 与基线一致。
* test(kernel): 用 List.item 替换弃用的 List.nth,全解决方案 ↵Somhairle H. Marisol13 days1-3/+3
| | | | Release 构建归零告警
* feat(occupation): 职业系统第一片 — Kernel 结构 / bootstrap 注入 ↵Somhairle H. Marisol13 days1-0/+66
| | | | | | / 存档 v3 Occupation.fs(Kind/Profile/State + 农夫/渔夫/货郎/书生 中文名常量,按设计 §1 表给初始 Money/Energy/Inventory);ItemKind 扩出 Fish/Spice/Scroll(basePrice 分支补齐,Food 10.0f 数值路径不变 → 无职业 digest 不动);WorldBootstrap.initialWorldWithOccupation 默认 None = 旧行为(Money/Energy 覆盖,库存字段先留数据侧、物理挂接留交易单——取舍见 design §2-C 反对加字段);WorldSave: v3 头仅在有职业时写入(保存 saveToFileWith / loadFromFileWith,v1/v2/v3 无职业类型默认,token 顺序 version|w|h|kind|task|story|…),默认路径 save 输出逐字节等同现行 v2;P10 测试 5 例(§1 表值、v3 round-trip、v1/v2 不吞档、双 seed 逐字节、中文名);Kernel.Tests 引用 Desktop 以驱动 WorldBootstrap(取舍:不做测试专用 shim)。TaskToken/StoryStage 为 v3 占位(任务系统后续单实现)。
* feat(kernel): 地图边界参数化与存档 v2Somhairle H. Marisol14 days1-0/+58
| | | | Sim 地图边界由常量 52 改为可配置(configureBounds,默认 64x48 = 与全部基线一致);Sim.step 裁剪、initialWorld 中心出生时点按当前边界读取;WorldSave 升级 V2 头携带 width/height 两字段,V1 旧存档照常读入并自动回退到 64x48;回归:512x384 边界裁剪/初界转正/双份存档往返/案例 v1 档兼容读。修复前一段中报错已修正的测试代码(Ensure saved-file timeouts)。
* feat(m6a): add file save acceptance smokeSomhairle H. Marisol2026-09-201-21/+92
| | | | | | | | | | | | | | | | | [Change Nature] This commit adds the bounded M6a file-save acceptance path. [New Capability] - Add file-level round-trip and deterministic continuation coverage. - Add Headless --m6a-smoke with digest checks and explicit PASS/FAIL output. [Implementation] - Reject non-finite numeric values and negative inventory quantities. - Exercise dialogue, chat/rumor, trade, events, annals, time, and RNG state. [Impact] - Affects Kernel save parsing, Kernel tests, and Headless smoke tooling. - Preserves the existing save format and M5 smoke behavior.
* feat(m6a): add save speed and day-night controlsSomhairle H. Marisol2026-09-201-0/+99