-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt at seperating round + turn machines #106
Conversation
9010b52
to
b5fc3b2
Compare
b5fc3b2
to
235df64
Compare
- split turn machine into its own file - start turn machine when starting round, then infinitely cycle until win conditions are met; set a question each time we enter the turn state and pass it down to the turn machine as input/context - we're invoking the turn machine from the round machine rather than instantiating a Turn model, like we do with the Round machine. This means we're currently not getting the same kind of logging for the turn machine as other machines - we might want to revisit this later - the turn machine currently isn't triggering the client to render the question or accept answers - the round machine doesn't currently type check - it has an action that needs moving to the turn machine - we might need to work out how to connect up with the work in `emit-timer-value-from-machine` which changes how the countdown works Co-authored-by: Rich James <[email protected]>
235df64
to
f95dcf5
Compare
actions: { | ||
type: "updateScores", | ||
params: dynamicParamFuncs.updateScores, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liz suggested that we calculate the points for the turn in the turn, then pass that up to the round which can update the ongoing score tracking with the new points. Not sure if this will help us unpick some of the complexity we need to work through with updateScores
or noClearWinner
, but it feels like a good idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, when you say it like that it makes sense
This allows us to inspect the events received by the state machine including those of child state machines, too.
Rather than invoke the turn machine directly in the round machine we now use the round model class as an intermediary to initiate the round machine. Next one the round is in the 'finished' state we will need to pass the received answers back from the turn to the round machine.
dcf7332
to
18d9d96
Compare
Replaced by #180 |
No description provided.