Expand description
replay: a record of a game re-run by the game’s own rules, with a
state hash per step (shuyi_core::state_hash). One record is run
twice, which finds luck or state that a run doesn’t own; two records
are run side by side. The answer says the first step where the two
runs’ hashes differ, and passes if there is none.
What a record is belongs to the game (for a turn game: its seed and
its commands, ADR-0003 §2). turns re-runs one over any
TurnRules.
A record stamped with what made it (ReplayRun::made) is checked
against this build’s stamp (GameTools::made) before anything is
compared: one made by another engine, another build of the game or
other content is refused, since its runs may differ with no desync,
unless the input says any_stamp.
Structs§
- Difference
- Where two runs part.
- Record
- A record handed to the game: its file’s name and its text.
- Replay
Input - What
replayre-runs. - Replay
Output - What
replayfound. - Replay
Run - One run of a record.
- Replay
Step - One step of a run: the state after a command.
Functions§
- first_
difference - The first step where
aandbdiffer, if they do. - replay
replay:input’s records, underroot, re-run bygame.- text
- What
replayfound, for people. - turns
- Re-runs
commandsfrominitialby the rules, hashing the state before them and after each: the run of a turn game’s recordfile. A refused command changes nothing and says why.