Last active
January 13, 2021 15:13
-
-
Save trinnguyen/d867f6752df1c58bd514ad1ee66e2042 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const inner_S0 = { | |
initial: 'S0_0', | |
states: { | |
S0_0: { | |
on: { | |
'i?': 'S0_1' | |
} | |
}, | |
S0_1: { | |
on: { | |
't, o!, x > 0': 'S0_2' | |
} | |
}, | |
S0_2: { | |
type: 'final', | |
} | |
} | |
}; | |
const inner_S2 = { | |
initial: 'S2_0', | |
states: { | |
S2_0: { | |
on: { | |
'c == Coin::C1, i? , t2': 'S2_1' | |
} | |
}, | |
S2_1: { | |
type: 'final', | |
} | |
} | |
}; | |
const draftv1 = Machine({ | |
id: 'draftv1', | |
initial: 'S0', | |
states: { | |
S0: { | |
on: { | |
'o!': 'S1' | |
}, | |
...inner_S0 | |
}, | |
S1: { | |
on: { | |
'h;': 'S2' | |
} | |
}, | |
S2: { | |
type: 'final', | |
...inner_S2 | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment