1. Define state
engine/src/state.ts declares the saved data and the class your rules edit:
.model() must exist on GameState. Give each field a valid initial value.
2. Define an event and command
Declare events once so their payloads are typed and checked:3. Put the command in a stage
A stage decides who may act and what happens next:runtime.players is the authoritative roster the match starts with, in seating order.
4. Assemble the game
game to the CLI. Your client imports the type of executor to get typed views and commands.
Preview locally
Run the rules and frontend together.