Modeling turns¶
Represent phase, current player, turn number, and terminal result explicitly.
The built-in GameLoop actions include game:loopStart, game:setActiveAgent,
game:nextTurn, game:setPhase, and game:loopStop. Domain actions should
check phase and actor before writing. Include an expected turn/version in
networked commands when stale requests are harmful, as Cuttle does.
CRDT convergence is not turn arbitration. Two offline peers may both observe the same turn and act. Decide whether both actions are valid, one is rejected by an authority, or a conflict state is recorded. A server-authoritative room serializes dispatches; a peer game needs commutative actions or explicit conflict handling.
Prefer HyperToken when replay and offline continuation matter. Prefer a central authority when a single exact sequence, hidden referee state, or competitive fairness is non-negotiable.