载入中...
搜索中...
未找到
eve::tactics::PathQuery类 参考final

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()

Result< std::vector< Cell > > eve::tactics::PathQuery::cellsInRange ( const BoardState &  board,
Cell  origin,
int  minimum,
int  maximum,
CellRangeMetric  metric 
)
static

Enumerate existing cells whose logical distance is within an inclusive range.

参数
boardBorrowed immutable board valid for the synchronous call.
originLogical range origin; it need not exist on the board.
minimumInclusive non-negative minimum distance.
maximumInclusive maximum distance, not smaller than minimum.
metricManhattan, 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()

Result< std::vector< Cell > > eve::tactics::PathQuery::path ( const BoardState &  board,
SubjectRef  subject,
Cell  target,
int  budget 
)
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.

被这些函数引用 eve::tactics::BattleSystem::previewMove().

◆ reachable()

Result< Reachability > eve::tactics::PathQuery::reachable ( const BoardState &  board,
SubjectRef  subject,
int  budget 
)
static

Compute all unoccupied reachable cells for a placed subject.

参数
boardBorrowed immutable board valid for the synchronous call.
subjectPlaced moving subject; its origin remains traversable.
budgetNon-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().


该类的文档由以下文件生成: