diff options
-rw-r--r-- | play.html | 24 | ||||
-rw-r--r-- | play.js | 7 | ||||
-rw-r--r-- | rules.js | 3 |
3 files changed, 22 insertions, 12 deletions
@@ -66,6 +66,20 @@ </div> </div> +<!-- POWERSTRUGGLE --> +<div id="played_power_card_panel" class="panel"> + <div id="played_power_card_header" class="panel_header">Played Power Card</div> + <div id="played_power_card" class="panel_body"></div> +</div> +<div id="ceausescu_panel" class="panel"> + <div id="ceausescu_header" class="panel_header">Ceausescu Cards</div> + <div id="ceausescu_hand" class="panel_body"></div> +</div> +<div id="power_panel" class="panel"> + <div id="power_header" class="panel_header">Power Struggle Hand</div> + <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> @@ -84,16 +98,6 @@ <div id="hand" class="panel_body"></div> </div> -<!-- POWERSTRUGGLE --> -<div id="ceausescu_panel" class="panel"> - <div id="ceausescu_header" class="panel_header">Ceausescu Cards</div> - <div id="ceausescu_hand" class="panel_body"></div> -</div> -<div id="power_panel" class="panel"> - <div id="power_header" class="panel_header">Power Struggle Hand</div> - <div id="power_hand" class="panel_body"></div> -</div> - <!-- OPPONENT HAND --> <div id="opp_hand_panel" class="panel"> <div id="opp_hand_header" class="panel_header">Opponent Hand</div> @@ -40,6 +40,7 @@ const ui = { event_reminder_list: document.getElementById("event_reminder_list"), played_card: document.getElementById("played_card"), + played_power_card: document.getElementById("played_power_card"), hand: document.getElementById("hand"), power_hand: document.getElementById("power_hand"), opp_hand: document.getElementById("opp_hand"), @@ -372,6 +373,10 @@ function on_update() { if (view.played_card > 0) ui.played_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]) + ui.samizdat_card.replaceChildren() if (view.samizdat > 0) ui.samizdat_card.appendChild(ui.cards[view.samizdat]) @@ -383,7 +388,7 @@ function on_update() { ui.power_hand.replaceChildren() if (view.power_hand) for (let c of view.power_hand) - ui.hand.appendChild(ui.power_cards[c]) + ui.power_hand.appendChild(ui.power_cards[c]) ui.opp_hand.replaceChildren() if (view.opp_hand) @@ -192,7 +192,8 @@ exports.view = function(state, player) { } if (game.is_pwr_struggle) { - view.strategy_discard = game.power_struggle_discard + view.power_struggle_discard = game.power_struggle_discard + view.played_power_card = game.played_power_card, } else { view.strategy_discard = game.strategy_discard } |