Skip to content

Instantly share code, notes, and snippets.

@garbles
Last active October 15, 2018 07:07
Show Gist options
  • Save garbles/daa6e98857a98a39d016827212b488e5 to your computer and use it in GitHub Desktop.
Save garbles/daa6e98857a98a39d016827212b488e5 to your computer and use it in GitHub Desktop.
Ready*
Ready*
Unit Ready*
attack -> Select Attack
defend -> Player Defend
move -> Select Move
use item -> Select Item
done -> Waiting
Select Attack
Select Attack Type*
select attack -> Select Target
Select Target
cancel -> Select Attack Type
attack -> Player Attack
Select Item
cancel -> Unit Ready
use -> Player Use Item
Select Move
select desination -> Player Move
Player Perform Action
complete -> Unit Ready
Player Attack
invalid -> Select Attack
Player Defend
invalid -> Unit Ready
Player Move
invalid -> Unit Ready
Player Use Item
invalid -> Select Item
Waiting
Waiting Ready*
player turn -> Ready
attack -> Opponent Attack
defend -> Opponent Defend
move -> Opponent Move
use item -> Opponent Use Item
Opponent Perform Action
complete -> Waiting Ready
Opponent Attack
Opponent Defend
Opponent Move
Opponent Use Item
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