Skip to content

Instantly share code, notes, and snippets.

@grancalavera
Last active October 27, 2019 13:14
Show Gist options
  • Save grancalavera/4755399dbe7ce0abc7033149e93cce0c to your computer and use it in GitHub Desktop.
Save grancalavera/4755399dbe7ce0abc7033149e93cce0c to your computer and use it in GitHub Desktop.
landing*
landing*
resolve user*
has token -> authentication
does not have token -> create anonymous user
authentication
valid token -> ttt
invalid token -> create anonymous user
create anonymous user
authenticate -> ttt
ttt
expire token -> landing
select*
join new game -> game
join existing game -> game
game
quit -> ttt
turn*
play -> is game over after turn?
wait
resume -> is game over after wait?
game over
play again? -> select
decision points
is game over after turn?
yes -> game over
no -> wait
is game over after wait?
yes -> game over
no -> turn
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment