summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-05 11:16:20 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-05 11:16:20 +0100
commit7b3aee84638017760f9ec2779e3d513a35be2cc1 (patch)
tree76d98ed3f87bc6b1b054d87566da877146118245 /play.js
parente2d9bcabb59b8244cc690958b7354ac2e54899ed (diff)
downloadvotes-for-women-7b3aee84638017760f9ec2779e3d513a35be2cc1.tar.gz
persistent cards
Diffstat (limited to 'play.js')
-rw-r--r--play.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/play.js b/play.js
index 58d88c8..bbfd7c2 100644
--- a/play.js
+++ b/play.js
@@ -346,6 +346,17 @@ function on_update() { // eslint-disable-line no-unused-vars
for (let c of view.out_of_play)
document.getElementById("out_of_play").appendChild(ui.cards[c])
+ for (let id of ['persistent_turn', 'persistent_game', 'persistent_ballot']) {
+ document.getElementById(id).replaceChildren()
+ for (let c of view[id] || []) {
+ let elt = create("div", {
+ className: `persistent_card ${CARDS[c].type}`,
+ innerHTML: sub_card_name(null, c)
+ })
+ document.getElementById(id).appendChild(elt)
+ }
+ }
+
action_button("commit_1_button", "+1 Button")
action_button("defer", "Defer")
action_button("match", "Match")