Design guidance¶
Start with the pieces, legal moves, and what each player can see. If you plan to share state across peers, also decide who can make changes and what should happen when two players act concurrently.
Use immutable tokens for identifiable entities, Stack/Source for ordered
collections, Space for zones and placements, and game:setState for
game-specific document keys. All mutations go through engine.dispatch().
Derived views should be rebuildable from canonical state.
The following pages cover common domains and include cases where a central authority or a different tool is the better choice.