diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-07-02 10:28:04 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 12:53:17 +0100 |
commit | 9a5318d4cdc5a18748e733975d57697d04dcc1ce (patch) | |
tree | ea5d49c155f3640032a3b2525c238f83113cd296 | |
parent | fc5a07b315414f1c34e702841a70e4621b51fe0a (diff) | |
download | hammer-of-the-scots-9a5318d4cdc5a18748e733975d57697d04dcc1ce.tar.gz |
Show turn info bar on all block games.
-rw-r--r-- | play.html | 2 | ||||
-rw-r--r-- | rules.js | 1 | ||||
-rw-r--r-- | ui.js | 1 |
3 files changed, 4 insertions, 0 deletions
@@ -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')} </div> </div> + <div class="turn_info">-</div> </div> <div class="grid_log"> @@ -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(), @@ -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(); |