summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-30 17:51:04 +0200
committerTor Andersson <tor@ccxvii.net>2021-07-01 13:09:28 +0200
commit296526198f9ed83c2f5d92cfac57b88856fe8c26 (patch)
tree9265071ac5bd5003b32e4514f0bba032fd323e3d
parentf0dcb1109356bb6c04577b90d2105948e9df030a (diff)
downloadserver-296526198f9ed83c2f5d92cfac57b88856fe8c26.tar.gz
Blink your turn when it changes from "Both" to a specific player.
-rw-r--r--public/common/client.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/common/client.js b/public/common/client.js
index 670fa07..4a58e47 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -298,18 +298,20 @@ function init_client(roles) {
}
let is_your_turn = false;
+let old_active = null;
function on_update_bar() {
document.getElementById("prompt").textContent = game.prompt;
if (game.actions) {
document.querySelector(".grid_top").classList.add("your_turn");
- if (!is_your_turn)
+ if (!is_your_turn || old_active != game.active)
start_blinker("YOUR TURN");
is_your_turn = true;
} else {
document.querySelector(".grid_top").classList.remove("your_turn");
is_your_turn = false;
}
+ old_active = game.active;
}
function on_update_log() {