summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-21 11:34:46 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-21 11:34:46 +0100
commit3deaf7e3bfe4bbcfb81b90c92587e36f72c03362 (patch)
tree219f06d98d6164fdbc13a6922e7486f4c93b2482 /play.js
parentdfd3c5d2237016b630885a0d78b9b3a6aed05611 (diff)
downloadnevsky-3deaf7e3bfe4bbcfb81b90c92587e36f72c03362.tar.gz
Darken turns before the start of the scenario too.
Diffstat (limited to 'play.js')
-rw-r--r--play.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/play.js b/play.js
index d7e851b..f33e023 100644
--- a/play.js
+++ b/play.js
@@ -1682,10 +1682,12 @@ function on_update() {
update_court()
+ let first_turn = view.scenario >> 5
+ let last_turn = view.scenario & 31
for (let i = 0; i <= 17; ++i) {
ui.calendar[i].classList.toggle("action", is_action("calendar", i))
if (i >= 1 && i <= 16)
- ui.calendar[i].classList.toggle("end", i > view.end)
+ ui.calendar[i].classList.toggle("end", i < first_turn || i > last_turn)
}
// Misc