Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

richpjames
Copy link
Contributor

No description provided.

@Gweaton Gweaton force-pushed the display-answer-once-round-is-over branch from 9010b52 to b5fc3b2 Compare May 8, 2024 10:46
@richpjames richpjames force-pushed the display-answer-once-round-is-over branch from b5fc3b2 to 235df64 Compare May 14, 2024 13:30
rich and others added 3 commits May 22, 2024 18:04
- 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]>
@yndajas yndajas force-pushed the display-answer-once-round-is-over branch from 235df64 to f95dcf5 Compare May 22, 2024 17:07
Comment on lines +77 to +80
actions: {
type: "updateScores",
params: dynamicParamFuncs.updateScores,
},
Copy link
Member

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?

Copy link
Contributor Author

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

rich and others added 4 commits June 7, 2024 12:22
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.
@richpjames richpjames force-pushed the display-answer-once-round-is-over branch from dcf7332 to 18d9d96 Compare June 7, 2024 11:26
@yndajas yndajas mentioned this pull request Jul 25, 2024
@yndajas
Copy link
Member

yndajas commented Aug 5, 2024

Replaced by #180

@yndajas yndajas closed this Aug 5, 2024
@yndajas yndajas deleted the display-answer-once-round-is-over branch August 5, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants