summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-10 00:18:26 +0100
committerTor Andersson <tor@ccxvii.net>2025-03-10 23:10:47 +0100
commitd810213990bf433a2efa24440bcd7cb1699e6448 (patch)
tree048c9aa390339542719fe44aac10a5ea1bca6181 /play.js
parentebe9d5b86b2fe547395524f6414d47c2e4448771 (diff)
downloadland-and-freedom-d810213990bf433a2efa24440bcd7cb1699e6448.tar.gz
Add hidden bag of glory option.
Diffstat (limited to 'play.js')
-rw-r--r--play.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/play.js b/play.js
index e6d5b37..0d77e55 100644
--- a/play.js
+++ b/play.js
@@ -31,6 +31,7 @@ const ui = {
c: document.getElementById("tokens_c"),
m: document.getElementById("tokens_m"),
},
+ bag_of_glory: document.getElementById("bag_of_glory"),
// spaces
tracks_x: [],
@@ -514,6 +515,15 @@ function on_update() { // eslint-disable-line no-unused-vars
ui.glory_container[i].appendChild(e)
}
+ ui.bag_of_glory.replaceChildren()
+ if (Array.isArray(view.bag_of_glory)) {
+ for (x of view.bag_of_glory) {
+ e = document.createElement("div")
+ e.className = "red token player " + faction_class[x]
+ ui.bag_of_glory.appendChild(e)
+ }
+ }
+
action_button("add_to_front", "+1 to a Front")
action_button("d_liberty", "Decrease Liberty")
action_button("soviet_support", "Soviet Support")