summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/play.js b/play.js
index 3e0300b..df7b04b 100644
--- a/play.js
+++ b/play.js
@@ -527,6 +527,8 @@ function on_update() {
ui.military_vp.className = `piece cylinder purple vp${5+view.military_vp}`
ui.political_vp.className = `piece cylinder orange vp${5+view.political_vp}`
+ document.getElementById("karl_marx").replaceChildren()
+ document.getElementById("jules_ducatel").replaceChildren()
document.getElementById("hand").replaceChildren()
document.getElementById("final").replaceChildren()
document.getElementById("discard").replaceChildren()
@@ -546,6 +548,26 @@ function on_update() {
if (view.discard)
document.getElementById("discard").appendChild(ui.cards[view.discard])
+ if (view.karl_marx || view.jules_ducatel) {
+ document.getElementById("event_grid").style.display = null
+ if (view.karl_marx) {
+ document.getElementById("karl_marx_panel").classList.remove("hide")
+ for (let c of view.karl_marx)
+ document.getElementById("karl_marx").appendChild(ui.cards[c])
+ } else {
+ document.getElementById("karl_marx_panel").classList.add("hide")
+ }
+ if (view.jules_ducatel) {
+ document.getElementById("jules_ducatel_panel").classList.remove("hide")
+ for (let c of view.jules_ducatel)
+ document.getElementById("jules_ducatel").appendChild(ui.cards[c])
+ } else {
+ document.getElementById("jules_ducatel_panel").classList.add("hide")
+ }
+ } else {
+ document.getElementById("event_grid").style.display = "none"
+ }
+
if (view.hand) {
document.getElementById("hand_panel").classList.remove("hide")
for (let c of view.hand)