summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-01-04 07:10:09 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-01-04 07:10:09 +0000
commit2a924526251c6aba437fcb83005947891f02a685 (patch)
treeb773228521ad81e613a6bca09520d096984bab48 /play.js
parentc9c84bb1b37e23f91959ac10bc4160011d24fdb5 (diff)
parentc3bc265c7eb16cb7ededbd4d11c49fe98c82e2bd (diff)
download1989-dawn-of-freedom-2a924526251c6aba437fcb83005947891f02a685.tar.gz
Tor updates
Diffstat (limited to 'play.js')
-rw-r--r--play.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/play.js b/play.js
index 0471007..f15659e 100644
--- a/play.js
+++ b/play.js
@@ -624,7 +624,7 @@ function layout_vp_marker() {
}
function layout_country(id) {
- // TODO: what number to display?
+ // TODO: what number to display?
if (view.revolutions[id])
ui.countries[id].className = "marker demInfl ctl v" + view.times_held[id]
else if (view.times_held[id] > 0)
@@ -848,11 +848,12 @@ function on_update() {
ui.hand.appendChild(ui.cards[c])
ui.power_hand.replaceChildren()
- if (view.is_pwr_struggle)
+ if (view.is_pwr_struggle) {
ui.power_hand.appendChild(ui.power_cards[53])
if (view.power_hand.length > 0)
for (let c of view.power_hand)
ui.power_hand.appendChild(ui.power_cards[c])
+ }
ui.power_discard.replaceChildren()
if (view.power_struggle_discard)
@@ -992,15 +993,14 @@ function sub_icon(match) {
return ICONS[match] || match
}
-function sub_arrow(match) {
- return '<span>&nbsp&#8594&nbsp</span>'
+function sub_arrow(_match) {
+ return " \u2192 "
}
function wrap_icons(match) {
- return `<span class="icon_holder">${match}</span>`;
+ return `<span class="marginalia">${match.replace("(", "").replace(")", "")}</span>`
}
-
const ICONS = {
'£CC': '<span class="icon com_c"></span>',
'£CU': '<span class="icon com_nc"></span>',
@@ -1045,9 +1045,7 @@ function on_log(text, ix) {
p.className = "i"
}
-/*
- text = text.replace(/(\(£[CDU][CU]\s\.to\s£[CDU][CU]\))/g, wrap_icons)
-*/
+ text = text.replace(/(\(£[CDU][CU]\s\.to\s£[CDU][CU]\))/g, wrap_icons)
text = text.replace(/_/g, " ")
text = text.replace(/C(\d+)/g, sub_card_name)
@@ -1122,13 +1120,13 @@ function on_log(text, ix) {
log_event = 0
}
-//Group events
+ // Group events
// Reset group box counters (when log is rewound)
if (ix <= log_event) log_event = 0
if (!scoring_cards.includes(event_n)) {
if (text.match(/^.E:/)) {
- p.classList.add("h2")
+ p.classList.add("header")
log_event = ix
text = text.replace(".E:", "")
}