Commit Graph

8 Commits

Author SHA1 Message Date
26f7ad6b2e refactor(02-06): align pathfinding structure with user scope 2026-09-10 11:21:53 +08:00
a2aedb3969 refactor(02-04): restore authorized path contract
- Match path/types.ts to the user-authored baseline plus nullable returns
- Keep graph contracts implementation-owned and preserve the mover bridge
2026-09-10 09:35:21 +08:00
239ac0d790 refactor(02-02): precompute node costs and BFS from start position in graph build 2026-09-09 20:02:00 +08:00
e27015c4d2 fix(02-02): cost 守卫允许 Infinity,仅拦 NaN 与负数 2026-09-09 19:30:12 +08:00
6f0f17fbf2 refactor(02-02): replace linear min-scan with binary heap priority queue in pathfinding search
- Add internal DistanceHeap (binary min-heap, lazy stale-entry skip) colocated in finder.ts
- search() extraction now pops the heap instead of scanning the full dist map
- Restore NaN-aware cost guard (!Number.isFinite || < 0) dropped in 622008f, fixes NaN warn-174 regression test
2026-09-09 19:15:25 +08:00
622008f67c refactor: 按审查意见调整寻路模块与开发规范 2026-09-09 19:05:57 +08:00
d9ee80f77f refactor(02-02): apply user review directives on path module
- 移除 system.ts 中 'mover' in movable 运行时形状检查与 IMovableWithMover,
  依 types.ts 修正后的类型直接绑定 IObjectMover<IObjectMovable>
- path 内导出类型(IPathGraph*、IPathfindingGraphBuilder)归位 types.ts,
  graph.ts/finder.ts 改由 types 导入
- 移除类与接口声明上的 jsdoc、类实现侧与接口重复的 jsdoc、region 标记;
  实现注释改为仅描述可观察行为(去除 Dijkstra 等实现叙述)
- 私有方法置于调用者之前(resolveFloorId、getNodeCost、search、startMove)
- system.test.ts 对齐 useMover(mover) 新签名并同步测试描述
2026-09-09 18:47:40 +08:00
cbcaec83dc refactor(02-02): comply with updated style rules, extract finder and drop temp function consts 2026-09-09 17:44:31 +08:00