From d0ea2c239e1380ad43c689f828449a1aa3546870 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 2 Jul 2021 10:28:04 +0200 Subject: Show turn info bar on all block games. --- play.html | 2 ++ rules.js | 1 + ui.js | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/play.html b/play.html index 214fabe..d0b6ff8 100644 --- a/play.html +++ b/play.html @@ -25,6 +25,7 @@ .role_info { background-color: tan; } .one .role_name { background-color: salmon; } .two .role_name { background-color: #eb5; } +.turn_info { background-color: burlywood; } /* CARDS */ @@ -303,6 +304,7 @@ body.shift .block.known:hover {
+
-
diff --git a/rules.js b/rules.js index 41a9130..63611dc 100644 --- a/rules.js +++ b/rules.js @@ -2397,6 +2397,7 @@ exports.setup = function (scenario, players) { state: null, show_cards: false, year: 705, + turn: 0, location: {}, steps: {}, owner: {}, diff --git a/ui.js b/ui.js index 9abea0b..cef0c15 100644 --- a/ui.js +++ b/ui.js @@ -668,6 +668,10 @@ function on_update() { document.getElementById("turn").className = "year_" + game.year; document.getElementById("caesar_vp").textContent = game.c_vp + " VP"; document.getElementById("pompeius_vp").textContent = game.p_vp + " VP"; + if (game.turn < 1) + document.querySelector(".turn_info").textContent = `Year ${game.year}`; + else + document.querySelector(".turn_info").textContent = `Turn ${game.turn} of Year ${game.year}`; show_action_button("#undo_button", "undo"); show_action_button("#surprise_button", "surprise"); -- cgit v1.2.3