From e9e0f9b8e1073d92697d4b9e84d24d45a5f7ff0d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 6 May 2023 19:44:14 +0200 Subject: Add panels for different card areas - hand, objective, final. --- play.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index f2691b2..1c3c137 100644 --- a/play.js +++ b/play.js @@ -357,11 +357,16 @@ function on_update() { ui.political_vp.className = `piece cylinder orange vp${5+view.political_vp}` document.getElementById("hand").replaceChildren() - if (view.objective) - document.getElementById("hand").appendChild(ui.cards[view.objective]) + document.getElementById("final").replaceChildren() + document.getElementById("objective").replaceChildren() if (view.hand) for (let c of view.hand) document.getElementById("hand").appendChild(ui.cards[c]) + if (view.final) + for (let c of view.final) + document.getElementById("final").appendChild(ui.cards[c]) + if (view.objective) + document.getElementById("objective").appendChild(ui.cards[view.objective]) for (let i = 0; i < space_names.length; ++i) layout[i] = [] -- cgit v1.2.3