25 void AddCommands(std::span<const sim::Command> commands);
26 void AddHash(uint64_t tick, uint64_t hash);
30 [[nodiscard]] std::expected<void, std::string>
Write(
const fs::path& path)
const;
44 [[nodiscard]]
static std::expected<ReplayPlayer, std::string>
Load(
const fs::path& path);
48 [[nodiscard]] std::vector<sim::Command>
TakeCommands(uint64_t applyTick, uint32_t limit);
51 void CheckHash(uint64_t tick, uint64_t hash);
55 void Rewind(uint64_t tick);
void Rewind(uint64_t tick)
std::vector< sim::Command > TakeCommands(uint64_t applyTick, uint32_t limit)
uint64_t Mismatches() const
size_t CommandCount() const
uint64_t LateCommands() const
static constexpr uint64_t LOOKAHEAD_TICKS
ReplayPlayer(ReplayFile replay)
uint64_t LastTick() const
void CheckHash(uint64_t tick, uint64_t hash)
static std::expected< ReplayPlayer, std::string > Load(const fs::path &path)
void AddCommands(std::span< const sim::Command > commands)
std::vector< sim::Command > m_commands
std::vector< ReplayTickHash > m_hashes
std::expected< void, std::string > Write(const fs::path &path) const
void AddHash(uint64_t tick, uint64_t hash)