From c0553c1d3484854fcfae1ff1dcb05c81dd9a6f13 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Wed, 29 Nov 2023 06:27:14 +0100 Subject: show nineteenth amendment voting score --- play.html | 19 +++++++++++++++++++ play.js | 15 +++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/play.html b/play.html index b039fd0..39998f0 100644 --- a/play.html +++ b/play.html @@ -279,6 +279,18 @@ div.congress_box.action { border: 5px solid white; } +div.nineteenth_amendment_score:not(.hide) { + position: absolute; + background-color: #EEE7D2; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + + font-weight: bold; + font-size: 24pt; +} + .piece { pointer-events: none; position: absolute; @@ -1059,6 +1071,13 @@ c5 3 13 7 17 8 8 2 9 3 11 12 1 5 5 12 8 16 5 8 5 8 3 22 l-3 14 -30 -1 c-35
+
+
0
+
+
+
0
+
+
diff --git a/play.js b/play.js index 4a3506b..e685fbd 100644 --- a/play.js +++ b/play.js @@ -29,6 +29,9 @@ let ui = { turn: document.getElementById("turn"), congress_box: document.getElementById("congress_box"), congress: [ null ], + nineteenth_amendment_score: document.getElementById("nineteenth_amendment_score"), + green_checks_count: document.getElementById("green_checks_count"), + red_xs_count: document.getElementById("red_xs_count"), player: [ document.getElementById("role_Suffragist"), document.getElementById("role_Opposition"), @@ -578,13 +581,11 @@ function on_log(text) { // eslint-disable-line no-unused-vars function support_info() { - // TODO show the # of green_checks and red_xs instead of the congress circles when the 19th has passed instead - return `${view.support_buttons}\u{2b50} ${view.support_hand}\u{1f3b4} ${view.green_checks} \u{2713}` + return `${view.support_buttons}\u{2b50} ${view.support_hand}\u{1f3b4}` } function opposition_info() { - // TODO show the # of green_checks and red_xs instead of the congress circles when the 19th has passed instead - return `${view.opposition_buttons}\u{2b50} ${view.opposition_hand}\u{1f3b4} ${view.red_xs} \u{2717}` + return `${view.opposition_buttons}\u{2b50} ${view.opposition_hand}\u{1f3b4}` } function layout_cubes(list, xorig, yorig) { @@ -631,6 +632,12 @@ function on_update() { // eslint-disable-line no-unused-vars ui.congress[c].classList.toggle("action", is_action("congress")) } + ui.nineteenth_amendment_score.classList.toggle("hide", !view.nineteenth_amendment) + if (view.nineteenth_amendment) { + ui.green_checks_count.textContent = view.green_checks + ui.red_xs_count.textContent = view.red_xs + } + ui.support_button_box.replaceChildren() for (let i = 0; i < view.support_buttons; ++i) { ui.support_button_box.appendChild(ui.support_buttons[i]) -- cgit v1.2.3