summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-30 12:21:52 +0100
committerTor Andersson <tor@ccxvii.net>2023-12-11 12:40:42 +0100
commit9eb9936104267ef345f5e0dc8d7bd459834b7019 (patch)
treeaffc84be396ba215f812ac2b5f2b7c3b8926a323 /play.js
parentf8a0d501b1269032620b30c9006f88a4ee8d6e9d (diff)
downloadwashingtons-war-9eb9936104267ef345f5e0dc8d7bd459834b7019.tar.gz
fix role panel
Diffstat (limited to 'play.js')
-rw-r--r--play.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/play.js b/play.js
index 6cb2fdc..f07bbb4 100644
--- a/play.js
+++ b/play.js
@@ -288,27 +288,22 @@ function update_units() {
build_map();
function player_info(player, nc, nq) {
- let info;
- if (nc == 1)
- info = "1 card in hand.";
- else
- info = nc + " cards in hand.";
- if (nq > 0)
- info += "\n" + nq + " OPS in queue.";
+ let info = ""
if (player == AMERICAN) {
- if (view.pennsylvania_and_new_jersey_line_mutinies)
- info += "\nPennsylvania and New Jersey Line Mutinies!";
- if (view.congress == CONTINENTAL_CONGRESS_DISPERSED)
- info += "\nContinental Congress Dispersed!";
+ if (view.pennsylvania_and_new_jersey_line_mutinies || view.congress == CONTINENTAL_CONGRESS_DISPERSED)
+ info += "\u{1f6ab} "
}
+ if (nq > 0)
+ info += nq + "\u{231b} "
+ info += nc + "\u{1f3b4}"
return info;
}
function on_update() {
let e;
- document.getElementById("british_info").textContent = player_info(BRITISH, view.b_cards, view.b_queue);
- document.getElementById("american_info").textContent = player_info(AMERICAN, view.a_cards, view.a_queue);
+ roles.American.stat.textContent = player_info(AMERICAN, view.a_cards, view.a_queue);
+ roles.British.stat.textContent = player_info(BRITISH, view.b_cards, view.b_queue);
if (!view.last_played)
document.getElementById("last_played").className = "card show card_back";