Per-arena contract: how to read a sim and how to draw it.
| 82 | round_winners: dict[int, str] |
| 83 | games: list[GameRef] |
| 84 | |
| 85 | |
| 86 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected