summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-06 22:37:40 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-07 19:05:52 +0200
commite137caa6f4cef04e18c8ecb2f41df49682f87678 (patch)
tree593debadcb036c131fd7e98611d41690d0466f58 /play.js
parentb05928ba1fd0fccf75a8d6c7e032d8365f580c72 (diff)
downloadtime-of-crisis-e137caa6f4cef04e18c8ecb2f41df49682f87678.tar.gz
Misc.
Diffstat (limited to 'play.js')
-rw-r--r--play.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/play.js b/play.js
index 7814414..58e083b 100644
--- a/play.js
+++ b/play.js
@@ -284,6 +284,7 @@ function set_has(set, item) {
}
const PLAYER_CLASS = [ "red", "blue", "yellow", "green" ]
+const PLAYER_NAME = [ "Red", "Blue", "Yellow", "Green" ]
const BARBARIAN_CLASS = [ "alamanni", "franks", "goths", "sassanids", "nomads" ]
const BOXES = {
@@ -665,6 +666,7 @@ let ui = {
active_event: document.getElementById("active_event"),
combat_mask: document.getElementById("combat_mask"),
discard: document.getElementById("discard"),
+ played_header: document.getElementById("played_header"),
played: document.getElementById("played"),
market: document.getElementById("market"),
pieces: document.getElementById("pieces"),
@@ -1445,6 +1447,9 @@ function on_update() {
ui.active_event.replaceChildren()
ui.active_event.appendChild(ui.event_cards[view.event])
+ ui.played_header.className = "panel_header p_" + PLAYER_CLASS[view.current]
+ ui.played_header.textContent = PLAYER_NAME[view.current] + " Played"
+ ui.played.className = "panel_body p_" + PLAYER_CLASS[view.current]
ui.played.replaceChildren()
if (view.played) {
for (let c of view.played) {