diff options
-rw-r--r-- | play.css | 1 | ||||
-rw-r--r-- | play.js | 7 | ||||
-rw-r--r-- | rules.js | 3 |
3 files changed, 5 insertions, 6 deletions
@@ -50,7 +50,6 @@ body.Versailles header.your_turn { background-color: hsl(199, 45%, 70%); } #final, #hand, #discard, #set_aside, #red_objective, #blue_objective { min-height: 350px; } #hand_panel { min-width: 1100px; } -body.censorship #hand_panel { min-width: 1370px; } #final_panel { min-width: 560px; } #set_aside_panel { min-width: 830px; } #discard_panel { min-width: 290px; } @@ -511,8 +511,6 @@ 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.querySelector("body").classList.toggle("censorship", view.censorship === 1) - document.getElementById("hand").replaceChildren() document.getElementById("final").replaceChildren() document.getElementById("discard").replaceChildren() @@ -547,6 +545,11 @@ function on_update() { document.getElementById("set_aside_panel").classList.add("hide") } + if (view.hand && view.hand.length === 5) + document.getElementById("discard_panel").classList.add("hide") + else + document.getElementById("discard_panel").classList.remove("hide") + for (let i = 0; i < space_names.length; ++i) layout[i] = [] @@ -3504,9 +3504,6 @@ exports.view = function (state, player) { set_aside: 0, } - if (game.censorship) - view.censorship = 1 - if (typeof game.red_objective === "object") view.red_objective = 2 else if (game.red_objective > 0) |