Last active
August 6, 2021 00:58
-
-
Save robertpenner/9c88e5b517046c615a44a56c318e92bd to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const machine = Machine({ | |
id: 'Tournament events during', | |
initial: 'Practice', | |
states: { | |
'Practice': { | |
initial: 'round 1', | |
states: { | |
'round 1': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
on: { 'START NEXT ROUND': 'round 2' }, | |
}, | |
'round 2': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
}, | |
}, | |
on: { 'START NEXT EVENT': 'Tuesday ProAm' }, | |
}, | |
'Tuesday ProAm': { | |
initial: 'round 1', | |
states: { | |
'round 1': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
}, | |
}, | |
on: { 'START NEXT EVENT': 'Wednesday ProAm' }, | |
}, | |
'Wednesday ProAm': { | |
initial: 'round 1', | |
states: { | |
'round 1': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
}, | |
}, | |
on: { 'START NEXT EVENT': 'AT&T' }, | |
}, | |
'AT&T': { | |
initial: 'round 1', | |
states: { | |
'round 1': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
on: { 'START NEXT ROUND': 'round 2' }, | |
}, | |
'round 2': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
on: { 'START NEXT ROUND': 'round 3' }, | |
}, | |
'round 3': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
on: { 'START NEXT ROUND': 'round 4' }, | |
}, | |
'round 4': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
// on: { 'START NEXT ROUND': 'round 3' }, | |
}, | |
}, | |
on: { 'START NEXT EVENT': 'AT&T Playoff' }, | |
}, | |
'AT&T Playoff': { | |
initial: 'round 1', | |
states: { | |
'round 1': { | |
initial: 'playing', | |
states: { | |
'playing': { | |
on: { 'DONE PLAY': 'complete' }, | |
}, | |
complete: {}, | |
}, | |
}, | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment