yasuki_web.snapshot.serialize_snapshot#
- serialize_snapshot(snapshot, token_names=None)[source]#
Serialize a redacted
ViewSnapshotto the JSON-ready shape the board client renders from.Cards the viewer may not identify are already
HiddenCardstubs in the snapshot, so this serializer cannot leak an identity it was not handed. Zone and deck keys are flattened to stable strings ("P1:province:0","P2:fate").token_namesmaps a creatable-token card id to its display name; when given, a battlefield or province card that creates tokens carries acreateslist for the per-card “Create” menu (a face-down province card is aHiddenCardstub, so its creations stay concealed).