Skip to content

Commit

Permalink
Add roundEnd state to roundMachine
Browse files Browse the repository at this point in the history
This is just useful for logging to see if the interactions in the model
are working as expected. Depending on the guard we will either play
another turn or end the round.
  • Loading branch information
rich committed Aug 20, 2024
1 parent 0ee4368 commit aeb9730
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/machines/round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ const roundMachine = setup({
states: {
turn: {
entry: [{ type: "setQuestion", params: dynamicParamFuncs.setQuestion }],
on: {
turnEnd: {
target: "roundEnd",
// guard: (_, __) => {
// check to see if round end conditions are met
// },
},
},
},
roundEnd: {
type: "final",
},
},
});
Expand Down

0 comments on commit aeb9730

Please sign in to comment.