Serialization and utilities
Common non-topology helpers from src/common/.
Serialization (serialization.ts)
replacer/sortingReplacer— JSON.stringify hooks forMapandSetreviver— JSON.parse hook to restoreMap/Set
Use in constructors when deserializing saved state.
Errors (errors.ts)
UserFacingError — message is an internal code; client is the localized player string.
Other utilities
| Export | Purpose | Example games |
|---|---|---|
shuffle |
In-place Fisher–Yates | Volcano, Witch Stones |
StackSet |
Path-tracking set | Sunspot, Stibro |
wng |
Procedural names | Homeworlds |
x2uid |
Deterministic hash id | Storisende |
Example games
- Complica — standard
reviverpattern in constructor