MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / ReplayRenderer

Class ReplayRenderer

codeclash/replay/base.py:84–94  ·  view source on GitHub ↗

Per-arena contract: how to read a sim and how to draw it.

Source from the content-addressed store, hash-verified

82 round_winners: dict[int, str]
83 games: list[GameRef]
84
85
86class ReplayRenderer(ABC):
87 """Per-arena contract: how to read a sim and how to draw it."""
88
89 arena: str = "" # must match config.game.name, e.g. "BattleSnake"
90 sim_glob: str = "sim_*.jsonl" # basename glob used to discover sims
91 DRAW_JS: str = "" # defines a global ``ARENA`` object with setup/draw/side
92 CSS: str = "" # optional arena-specific style additions
93
94 @abstractmethod
95 def parse(self, raw: bytes, players: list[dict] | None = None) -> ReplayData:
96 """Decode raw sim bytes into a :class:`ReplayData`. Input format is opaque."""
97

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected