Replays accepted commands against an identity-compatible starting battle. 更多...
#include <TacticsReplay.h>
静态 Public 成员函数 | |
| static std::vector< BattleCommand > | commandsFrom (Battle &battle, Revision fromRevision) |
| Return an owning copy of commands whose result is newer than fromRevision. | |
| static Result< void > | replay (Battle &battle, std::span< const BattleCommand > commands) |
| Apply commands in sequence and verify revision/sequence agreement after every commit. | |
详细描述
Replays accepted commands against an identity-compatible starting battle.
Replay is simulation-thread-affine and invokes no unknown callbacks. Every command carries its expected and resulting revision; divergence stops at the first command and leaves the successfully applied prefix observable.
在文件 TacticsReplay.h 第 20 行定义.
成员函数说明
◆ commandsFrom()
|
static |
Return an owning copy of commands whose result is newer than fromRevision.
在文件 TacticsReplay.cpp 第 45 行定义.
◆ replay()
|
static |
Apply commands in sequence and verify revision/sequence agreement after every commit.
- 返回
- Applied for a non-empty sequence, NoOp for an empty sequence, or the first divergence.
在文件 TacticsReplay.cpp 第 52 行定义.
引用了 eve::Applied, commands, eve::Conflict, eve::Diagnostic::error(), eve::tactics::BattleCommand::expectedRevision, eve::Result< T >::failure(), index, eve::InvariantViolation, eve::tactics::BattleCommand::kind, eve::NoOp, path, eve::tactics::BattleCommand::resultingRevision, eve::tactics::BattleCommand::sequence, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::tactics::Tactics::replay() , 以及 eve::tactics::Tactics::replayJson().
该类的文档由以下文件生成:
- src/modules/tactics/TacticsReplay.h
- src/modules/tactics/TacticsReplay.cpp