File size: 738 Bytes
3831e97 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | """Debug dump of live session state."""
from __future__ import annotations
import json
from game.sim.session import GameSession
from game.sim.day_cycle import Pace
from game.sim.stats import summarize_director
def dump_session(seed: int = 0) -> dict:
s = GameSession(rng_seed=seed, pace=Pace.BRISK)
s.open_shop()
for _ in range(20):
s.tick(0.25)
return {
"phase": s.day.phase.value,
"wallet": s.economy.wallet,
"atmosphere": s.atmosphere.snapshot,
"director": summarize_director(s.director.stats),
"agents": [a.to_dict() for a in s.director.agents],
}
if __name__ == "__main__":
print(json.dumps(dump_session(), ensure_ascii=False, indent=2))
# reseal-product R16
|