Last active
February 18, 2020 20:20
-
-
Save korsvanloon/e4aad0942ee85051c219832a38bea82c to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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 fetchMachine = Machine({ | |
id: 'fetch', | |
context: { | |
retries: 0 | |
}, | |
"states": { | |
"welcome": { | |
"id": "eb562936", | |
"on": { | |
"INITIALIZING_START": "initializing world" | |
} | |
}, | |
"initializing world": { | |
"id": "aa7ecf5c", | |
"on": { | |
"GAME_READY": "choosing nation" | |
} | |
}, | |
"initialized": { | |
"id": "8f5df612", | |
"on": { | |
"GAME_START": "running" | |
} | |
}, | |
"running": { | |
"id": "cbf54fad", | |
"on": { | |
"GAME_FINISH": "finshed", | |
"PAUZE": "paused" | |
} | |
}, | |
"finshed": { | |
"id": "ed6daac4" | |
}, | |
"paused": { | |
"id": "0d0ae797", | |
"on": { | |
"RESTART": "initialized", | |
"RESUME": "running" | |
} | |
}, | |
"choosing nation": { | |
"id": "ff4f7abc", | |
"on": { | |
"NATION_CHOOSE": "nation chosen" | |
} | |
}, | |
"nation chosen": { | |
"id": "1fdee96b", | |
"on": { | |
"VOLCANO_START": "raising volcanos", | |
"COMET_START": "dropping comets", | |
"POISON_START": "poisoning rivers", | |
"DISEASE_START": "releasing diseases" | |
} | |
}, | |
"raising volcanos": { | |
"id": "778f7181" | |
}, | |
"dropping comets": { | |
"id": "b933d93d" | |
}, | |
"poisoning rivers": { | |
"id": "852d1ce7" | |
}, | |
"releasing diseases": { | |
"id": "70f5e5a9" | |
} | |
}, | |
"initial": "welcome" | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment