Skip to content

Commit d3fddfe

Browse files
author
rich
committed
Add roundEnd state to roundMachine
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.
1 parent e575493 commit d3fddfe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

server/machines/round.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ const roundMachine = setup({
4242
states: {
4343
turn: {
4444
entry: [{ type: "setQuestion", params: dynamicParamFuncs.setQuestion }],
45+
on: {
46+
turnEnd: {
47+
target: "roundEnd",
48+
// guard: (_, __) => {
49+
// check to see if round end conditions are met
50+
// },
51+
},
52+
},
53+
},
54+
roundEnd: {
55+
type: "final",
4556
},
4657
},
4758
});

0 commit comments

Comments
 (0)