Now that finished games can be exported as JSON transcripts (#3, shipped in #8), the natural companion is a way to replay one.
Proposed
- A
deepwolf replay PATH sub-command that loads a transcript JSON and re-renders the game to the terminal — the same coloured event stream simulate produces, but from a saved file rather than a live game.
- A loader in
deepwolf/game/transcript.py (e.g. from_json(data)) that reconstructs what the CLI renderer needs. It need not rebuild a live GameState; re-emitting the stored events through the existing renderer is enough.
Notes
- Transcript text is already localised at write time, so
replay just prints it.
- Add a round-trip test: simulate →
transcript.save → replay.
cc @MichisGitIsKing — you clearly know this corner of the codebase well; this one is yours if you'd like it. Comment to claim and I'll assign it.
Now that finished games can be exported as JSON transcripts (#3, shipped in #8), the natural companion is a way to replay one.
Proposed
deepwolf replay PATHsub-command that loads a transcript JSON and re-renders the game to the terminal — the same coloured event streamsimulateproduces, but from a saved file rather than a live game.deepwolf/game/transcript.py(e.g.from_json(data)) that reconstructs what the CLI renderer needs. It need not rebuild a liveGameState; re-emitting the stored events through the existing renderer is enough.Notes
replayjust prints it.transcript.save→replay.cc @MichisGitIsKing — you clearly know this corner of the codebase well; this one is yours if you'd like it. Comment to claim and I'll assign it.