Files
tft/backend/tft/sim/rounds.py
2026-07-23 00:35:30 +02:00

17 lines
558 B
Python

"""Stage/round schedule: labels, types, augment rounds."""
MAX_STAGE = 9
def schedule(cfg: dict) -> list[dict]:
r = cfg["rounds"]
rounds = []
for i, kind in enumerate(r["stage1"], start=1):
rounds.append({"label": f"1-{i}", "stage": 1, "kind": kind})
for stage in range(2, MAX_STAGE + 1):
for i, kind in enumerate(r["stage_n"], start=1):
rounds.append({"label": f"{stage}-{i}", "stage": stage, "kind": kind})
for rnd in rounds:
rnd["augment"] = rnd["label"] in r["augment_rounds"]
return rounds