Skip to content

Add a deepwolf replay command #16

Description

@JuneQQQ

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.savereplay.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions