Created
February 13, 2021 15:03
-
-
Save senritsu/4fa21691cd08c6fb7906f25280355206 to your computer and use it in GitHub Desktop.
Simple Deckbuilder
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
Simple Deckbuilder | |
# set up decks, etc. | |
Preparation* | |
done -> Turn | |
Turn | |
# user is able to to something here | |
Idle* | |
play card -> Executing action | |
end turn -> End of turn | |
# mostly animation and context changes | |
Executing action | |
Prerequisites met?* | |
yes? -> Apply effects | |
no? -> Show error | |
Show error | |
done -> Idle | |
Apply effects | |
done -> Idle | |
# mostly animation and context changes | |
End of turn | |
Last turn of final round?* | |
yes? -> Tally Score | |
no? -> Discard played cards | |
Discard played cards | |
done -> Draw new hand | |
Draw new hand | |
Draw?* | |
deck and discard empty? -> Next player | |
hand full? -> Next player | |
deck empty? -> Shuffle Deck | |
hand not full? -> Draw | |
Shuffle Deck | |
done -> Draw? | |
Draw | |
done -> Draw? | |
# increment round/turn and show player(s) round/turn number and whose turn it is | |
Next player | |
done -> Turn | |
# show scores to the player(s) | |
Tally Score | |
restart -> Preparation |
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
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