diff options
-rw-r--r-- | play.html | 36 | ||||
-rw-r--r-- | play.js | 12 |
2 files changed, 35 insertions, 13 deletions
@@ -66,6 +66,32 @@ </div> </div> +<!-- EVENTS ON THE TABLE --> +<div id="table_panel" class="panel"> + <div id="table_header" class="panel_header">Cards on the Table</div> + <div id="table_cards" class="panel_body"></div> +</div> + +<!-- PLAYED CARD --> +<div id="played_card_panel" class="panel"> + <div id="played_card_header" class="panel_header">Played Card</div> + <div id="played_card" class="panel_body"></div> + <!--- <div id="power_card_header" class="panel_header">Power Struggle</div> + <div id="communist_card" class="panel_body"></div> + <div id="democrat_card" class="panel_body"></div> ---> + +</div> + +<!-- PLAYED CARD - POWERSTRUGGLE --> +<div id="scoring_card_panel" class="panel"> + <div id="scoring_card_header" class="panel_header">Power Struggle</div> + <div id="scoring_card" class="panel_body"></div> + <div id="power_card_header" class="panel_header">Power Struggle</div> + <div id="communist_card" class="panel_body"></div> + <div id="democrat_card" class="panel_body"></div> + +</div> + <!-- POWERSTRUGGLE --> <div id="played_power_card_panel" class="panel"> <div id="played_power_card_header" class="panel_header">Played Power Card</div> @@ -80,17 +106,7 @@ <div id="power_hand" class="panel_body"></div> </div> -<!-- EVENTS ON THE TABLE --> -<div id="table_panel" class="panel"> - <div id="table_header" class="panel_header">Cards on the Table</div> - <div id="table_cards" class="panel_body"></div> -</div> -<!-- PLAYED CARD --> -<div id="played_card_panel" class="panel"> - <div id="played_card_header" class="panel_header">Played Card</div> - <div id="played_card" class="panel_body"></div> -</div> <!-- HAND --> <div id="hand_panel" class="panel"> @@ -40,6 +40,7 @@ const ui = { event_reminder_list: document.getElementById("event_reminder_list"), played_card: document.getElementById("played_card"), + scoring_card: document.getElementById("scoring_card"), played_power_card: document.getElementById("played_power_card"), hand: document.getElementById("hand"), power_hand: document.getElementById("power_hand"), @@ -370,9 +371,14 @@ function on_update() { // UPDATE CARD DISPLAYS ui.played_card.replaceChildren() - if (view.played_card > 0) - ui.played_card.appendChild(ui.cards[view.played_card]) - + + if (!view.is_pwr_struggle) { + if (view.played_card > 0) + ui.played_card.appendChild(ui.cards[view.played_card]) + } else { + if (view.played_card > 0) + ui.scoring_card.appendChild(ui.cards[view.played_card]) + } ui.played_power_card.replaceChildren() if (view.played_power_card > 0) ui.played_power_card.appendChild(ui.power_cards[view.played_power_card]) |