Skip to content

Instantly share code, notes, and snippets.

@robertpenner
Created August 6, 2021 19:34
Show Gist options
  • Save robertpenner/21aeb0c27a10cd11e771a9d13c6b8233 to your computer and use it in GitHub Desktop.
Save robertpenner/21aeb0c27a10cd11e771a9d13c6b8233 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "A Round for a Pro-Am Pair",
type: "parallel",
states: {
"Player 1 (Amateur)": {
id: "P1",
// onDone:
initial: "waiting",
states: {
waiting: {
on: {
"BALL HOLED": "playing.history",
},
},
playing: {
initial: "hole 1",
states: {
"hole 1": {
// onDone: "#P1.waiting",
on: {
"BALL HOLED": {
target: ["#P1.waiting", "hole 2"],
},
},
},
"hole 2": {},
"hole 18": {},
history: { type: "history" },
},
},
},
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment