app/review_session.h¶
physical review of a finished game (review-docs PLAN §6.1).
A sibling of GameSession that drives the same IBoardBackend to scrub a past game forward and backward on the real board. It replays the recorded game through an engine (to encode each move and cache the per-position FENs) and through a PieceTracker (to know the exact piece identity — and therefore each captured piece’s storage slot — at every ply). That replayed identity is what makes backward stepping a single gantry operation rather than a full replay (§6.2): the session knows precisely what each move did.
Scope (R3a): stepping/undo from the start position. jumpToPly is incremental; the direct board_setup_planner path (§6.3–6.4) and “play from here” (§6.5) are R3b. Mutually exclusive with a live GameSession — the front-end switches modes.
-
namespace kirin
-
class ReviewSession¶
- #include <review_session.h>
Public Functions
-
ReviewSession(IEngine &engine, IBoardBackend &backend)¶
-
bool open(const GameRecord &record, ResetMode resetMode = ResetMode::Hand)¶
-
inline void setFollowOnBoard(bool follow)¶
-
inline bool followOnBoard() const¶
-
inline bool physicalReady() const¶
-
int appendMoves(const std::vector<std::string> &uci)¶
-
bool truncateTo(int ply)¶
-
bool stepForward()¶
-
bool stepBackward()¶
-
bool jumpToPly(int ply)¶
-
void close()¶
-
inline const std::vector<std::string> &moves() const¶
-
inline int currentPly() const¶
-
inline int plyCount() const¶
-
inline bool isOpen() const¶
-
const std::string ¤tFen() const¶
-
inline const PieceTracker &identity() const¶
Public Static Attributes
-
static constexpr int kJumpStepThreshold = 3¶
Private Functions
-
PieceTracker snapshotAt(int ply) const¶
Private Members
-
IBoardBackend &backend_¶
-
GameRecord record_¶
-
std::vector<int> encoded_¶
-
std::vector<int> capturedSlot_¶
-
std::vector<std::string> fens_¶
-
PieceTracker liveTracker_¶
-
int cursor_ = 0¶
-
bool open_ = false¶
-
bool followOnBoard_ = true¶
-
bool physicalReady_ = false¶
-
ReviewSession(IEngine &engine, IBoardBackend &backend)¶
-
class ReviewSession¶