summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/play.js b/play.js
index 99c6f66..379c810 100644
--- a/play.js
+++ b/play.js
@@ -598,7 +598,7 @@ function on_update() {
ce.classList.remove("card_back");
}
- if (p == player_index[player]) {
+ if (p === player_index[player]) {
ui.player[p].gift_2.classList.toggle('action', is_place_gift_action(2));
ui.player[p].gift_4.classList.toggle('action', is_place_gift_action(4));
ui.player[p].gift_6.classList.toggle('action', is_place_gift_action(6));
@@ -623,14 +623,14 @@ function on_update() {
me.appendChild(ce);
}
- if (view.players[p].coins == 0) {
+ if (view.players[p].coins === 0) {
ui.player[p].coin.classList.add("hide");
} else {
ui.player[p].coin.classList.remove("hide");
ui.player[p].coin.textContent = view.players[p].coins;
}
- if (view.players[p].prizes == 0) {
+ if (view.players[p].prizes === 0) {
ui.player[p].prize.classList.add("hide");
} else {
ui.player[p].prize.classList.remove("hide");
@@ -640,6 +640,8 @@ function on_update() {
ui.player[p].prize.textContent = view.players[p].prizes + " prizes";
}
+ ui.player[p].role.classList.toggle("active", p === player_index[view.active])
+
ui.player[p].dial.className = "player_dial " + view.players[p].loyalty + " p" + p;
ui.player[p].role_loy_icon.className = "role_loyalty_icon " + view.players[p].loyalty;