summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-21 13:57:56 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-21 13:57:56 +0200
commit4f975c187d99bd0e02e52c268a00d1ed9a426c3d (patch)
treecab7f91cc20eeec3755ec0711ff590cdda737a38 /play.js
parent8660868df68a35c8b8c2eff04f47ef5bb41df52e (diff)
downloadplantagenet-4f975c187d99bd0e02e52c268a00d1ed9a426c3d.tar.gz
game end marker
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/play.js b/play.js
index 9356fbb..e2e8a50 100644
--- a/play.js
+++ b/play.js
@@ -1554,14 +1554,20 @@ function on_update() {
}
ui.turn.style.left = (calendar_xy[view.turn >> 1][0] + 91 - 52) + "px"
ui.turn.style.top = (calendar_xy[view.turn >> 1][1] + 94) + "px"
- ui.end.style.left = (calendar_xy[view.end][0] + 91 - 52) + "px"
- ui.end.style.top = (calendar_xy[view.end][1] + 94) + "px"
+
+ if (view.end < 16) {
+ ui.end.style.display = null
+ ui.end.style.left = (calendar_xy[view.end][0] + 91 - 52) + "px"
+ ui.end.style.top = (calendar_xy[view.end][1] + 94) + "px"
+ } else {
+ ui.end.style.display = "none"
+ }
ui.held_york.textContent = `${view.held_y} Held`
ui.held_lancaster.textContent = `${view.held_l} Held`
if (view.victory_check <= 45) {
- ui.victory_check.style.display = "block"
+ ui.victory_check.style.display = null
ui.victory_check.style.top = (track_xy[view.victory_check][1]) + "px"
ui.victory_check.style.left = (track_xy[view.victory_check][0]) + "px"
} else {