From 9a5318d4cdc5a18748e733975d57697d04dcc1ce 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 | 1 + 3 files changed, 4 insertions(+) diff --git a/play.html b/play.html index 1d46bc5..e621218 100644 --- a/play.html +++ b/play.html @@ -21,6 +21,7 @@ .grid_top.your_turn { background-color: orange; } .one .role_name { background-color: salmon; } .two .role_name { background-color: skyblue; } +.turn_info { background-color: gainsboro; } .card { width: 225px; @@ -389,6 +390,7 @@ div.card_3{background-image:url('cards/card_3.jpg')} +
-
diff --git a/rules.js b/rules.js index 8d1bb82..13c3816 100644 --- a/rules.js +++ b/rules.js @@ -2887,6 +2887,7 @@ exports.view = function(state, current) { let view = { log: game.log, year: game.year, + turn: 6 - (game.e_hand.length + (game.e_card ? 1 : 0)), edward: game.edward, e_vp: count_english_nobles(), s_vp: count_scottish_nobles(), diff --git a/ui.js b/ui.js index f6dd5b0..592de2e 100644 --- a/ui.js +++ b/ui.js @@ -721,6 +721,7 @@ function on_update() { document.getElementById("england_vp").textContent = game.e_vp; document.getElementById("scotland_vp").textContent = game.s_vp; + document.querySelector(".turn_info").textContent = `Turn ${game.turn} of Year ${game.year}`; update_cards(); update_map(); -- cgit v1.2.3