Pantograph/pantograph/compiler.py

14 lines
359 B
Python
Raw Normal View History

2024-05-31 17:09:12 -07:00
from dataclasses import dataclass
@dataclass(frozen=True)
class TacticInvocation:
before: str
after: str
tactic: str
@staticmethod
def parse(payload: dict):
return TacticInvocation(before=payload["goalBefore"],
after=payload["goalAfter"],
tactic=payload["tactic"])