Pure deterministic board path algorithms. 更多...
#include <TacticsPath.h>
静态 Public 成员函数 | |
| static Result< Reachability > | reachable (const BoardState &board, SubjectRef subject, int budget) |
| Compute all unoccupied reachable cells for a placed subject. | |
| static Result< std::vector< Cell > > | path (const BoardState &board, SubjectRef subject, Cell target, int budget) |
| Compute a minimum-cost origin-to-target path within budget. | |
| static Result< std::vector< Cell > > | cellsInRange (const BoardState &board, Cell origin, int minimum, int maximum, CellRangeMetric metric) |
| Enumerate existing cells whose logical distance is within an inclusive range. | |
详细描述
Pure deterministic board path algorithms.
Queries are thread-safe when no caller mutates the borrowed BoardState. They retain no references and invoke no callbacks. Equal-cost frontier ties are ordered by cost then Cell coordinates, yielding bit-exact results.
在文件 TacticsPath.h 第 55 行定义.
成员函数说明
◆ cellsInRange()
|
static |
Enumerate existing cells whose logical distance is within an inclusive range.
- 参数
-
board Borrowed immutable board valid for the synchronous call. origin Logical range origin; it need not exist on the board. minimum Inclusive non-negative minimum distance. maximum Inclusive maximum distance, not smaller than minimum. metric Manhattan, Chebyshev, or axial-hex distance.
- 返回
- Cells in deterministic coordinate order.
在文件 TacticsPath.cpp 第 178 行定义.
引用了 board, cell, distance, dx, dy, dz, eve::Diagnostic::error(), eve::InvalidArgument, maximum, minimum, origin , 以及 eve::Unsupported.
被这些函数引用 eve::tactics::Tactics::cellsInRange() , 以及 eve::tactics::visibleCellsInRange().
◆ path()
|
static |
Compute a minimum-cost origin-to-target path within budget.
- 返回
- Owning path including origin and target, or a structured failure.
在文件 TacticsPath.cpp 第 154 行定义.
引用了 board, eve::Diagnostic::error(), found, eve::InvariantViolation, eve::NotFound, origin, subject , 以及 target.
◆ reachable()
|
static |
Compute all unoccupied reachable cells for a placed subject.
- 参数
-
board Borrowed immutable board valid for the synchronous call. subject Placed moving subject; its origin remains traversable. budget Non-negative fixed-point movement budget.
- 返回
- Owning reachability snapshot or a structured failure.
在文件 TacticsPath.cpp 第 138 行定义.
引用了 board, cost, eve::Result< T >::failure(), origin , 以及 subject.
被这些函数引用 eve::tactics::Tactics::interactionContext(), eve::tactics::BattleSystem::previewMove() , 以及 eve::tactics::Tactics::reachable().
该类的文档由以下文件生成:
- src/modules/tactics/TacticsPath.h
- src/modules/tactics/TacticsPath.cpp