summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/play.js b/play.js
index 356e5a0..ffef09f 100644
--- a/play.js
+++ b/play.js
@@ -62,6 +62,8 @@ const ui = {
},
tracks: document.getElementById('tracks'),
hero_points: document.querySelector('#role_Anarchist .role_stat'),
+ turn_info: document.getElementById('turn_info'),
+ turn_info_card: document.getElementById('turn_info_card'),
year: document.getElementById('year'),
blank_markers: [],
bonuses: [],
@@ -284,7 +286,7 @@ function on_update() {
for (let c of view.hand) {
ui.cards[c].classList.remove('selected');
ui.hand.appendChild(ui.cards[c]);
- if (c === view.selected_card || view.final_bid.includes(c)) {
+ if (view.selected_cards.includes(c)) {
ui.cards[c].classList.add('selected');
}
}
@@ -324,6 +326,12 @@ function on_update() {
ui.tableaus[faction_id].appendChild(ui.cards[c]);
}
}
+ if (view.played_card === null) {
+ ui.turn_info.style.display = 'none';
+ }
+ else {
+ ui.turn_info_card.setAttribute('data-card-id', view.played_card + '');
+ }
for (let g = 0; g < view.glory.length; ++g) {
ui.glory[g].setAttribute('data-faction-id', view.glory[g]);
}
@@ -331,9 +339,9 @@ function on_update() {
e.classList.toggle('action', is_action(e.my_action, e.my_id));
ui.year.replaceChildren(`Year ${view.year}`);
action_button('add_to_front', '+1 to a Front');
+ action_button('d_liberty', 'Decrease Liberty');
action_button('soviet_support', 'Soviet Support');
action_button('collectivization', 'Collectivization');
- action_button('d_liberty', 'Decrease Liberty');
action_button('d_collectivization', 'Decrease Collectivization');
action_button('d_foreign_aid', 'Decrease Foreign Aid');
action_button('d_government', 'Decrease Government');