docker000 / game /sim /phase_order.py
seachen's picture
Deploy Quiet Town Corner Shop Docker demo (Gradio + Python sim) (part 5)
3831e97 verified
Raw
History Blame Contribute Delete
344 Bytes
"""Canonical PREP→NIGHT phase order."""
from __future__ import annotations
from game.sim.day_cycle import Phase
PHASE_ORDER = [Phase.PREP, Phase.MORNING, Phase.AFTERNOON, Phase.DUSK, Phase.CLOSING, Phase.NIGHT]
STAGE_ORDER = [p.value for p in PHASE_ORDER]
def advance_phase_index(i: int) -> int:
return min(i + 1, len(PHASE_ORDER) - 1)