summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-28 00:29:23 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-28 23:33:22 +0100
commit902f03c38dac77a64e1259f04c4f04c2227c3b84 (patch)
tree23d988a47a2f0bd09d989df1cd9e235cd8d37dd9 /play.js
parent24a1e303b84fad2a4c60c037109943025912999e (diff)
downloadmaria-902f03c38dac77a64e1259f04c4f04c2227c3b84.tar.gz
show how many markers are missing (with text label)
Diffstat (limited to 'play.js')
-rw-r--r--play.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/play.js b/play.js
index f8dc393..7824ce3 100644
--- a/play.js
+++ b/play.js
@@ -583,6 +583,12 @@ const ui = {
document.getElementById("hand_bavaria"),
document.getElementById("hand_saxony"),
],
+ missing: [
+ document.getElementById("missing_france"),
+ document.getElementById("missing_prussia"),
+ document.getElementById("missing_pragmatic"),
+ document.getElementById("missing_austria"),
+ ],
cities: [],
roads: [],
action_register: [],
@@ -1241,6 +1247,11 @@ function layout_victory_pool(pow, max, x, y) {
e.style.top = (y - 16 + (i/5|0) * 20) + "px"
ui.markers_element.appendChild(e)
}
+ if (n > max) {
+ ui.missing[pow].textContent = "+" + (n-max)
+ } else {
+ ui.missing[pow].textContent = ""
+ }
for (let i = 0; i < m; ++i) {
let e = ui.victory[pow][used_victory[pow]++]
if (pow === P_FRANCE) {