Skip to content

Instantly share code, notes, and snippets.

@robertpenner
Last active August 6, 2021 18:42
Show Gist options
  • Save robertpenner/5e52218d9ed98d9bff8f437ea190cfac to your computer and use it in GitHub Desktop.
Save robertpenner/5e52218d9ed98d9bff8f437ea190cfac to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Tuesday - Round 1",
initial: "playing",
states: {
playing: {
onDone: 'complete',
type: "parallel",
states: {
"course 1": {
type: "parallel",
states: {
"Pro-Am": {
initial: "playing",
states: {
playing: {
onDone: "complete",
},
complete: { type: 'final' },
},
},
Pro: {
initial: "playing",
states: {
playing: {
onDone: "complete",
},
complete: { type: 'final' },
},
},
},
},
"course 2": {
type: "parallel",
states: {
"Pro-Am": {
initial: "playing",
states: {
playing: {
onDone: "complete",
},
complete: { type: 'final' },
},
},
Pro: {
initial: "playing",
states: {
playing: {
onDone: "complete",
},
complete: { type: 'final' },
},
},
},
},
"course 3": {
type: "parallel",
states: {
"Pro-Am": {
initial: "playing",
states: {
playing: {
onDone: "complete",
},
complete: { type: 'final' },
},
},
Pro: {
initial: "playing",
states: {
playing: {
onDone: "complete",
},
complete: { type: 'final' },
},
},
},
},
},
},
complete: { type: 'final' },
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment