diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-15 17:52:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:08:56 +0100 |
commit | adf559f1b779690eb0e0bef21b4c29fb69520c75 (patch) | |
tree | 53d1c8eb5f7a2ed47d149a5a7130c06a9d7effec /ui.js | |
parent | 526036030fb0466f370848fd28002c6da24c451f (diff) | |
download | julius-caesar-adf559f1b779690eb0e0bef21b4c29fb69520c75.tar.gz |
Add "Rematch" button for easier repeat match making.
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -54,8 +54,6 @@ const step_up_animation = [ { transform: 'translateY(0px)' }, ]; -let game = null; - let ui = { spaces: {}, known: {}, @@ -530,7 +528,7 @@ function update_map() { } } -function update_battle(player) { +function update_battle() { function fill_cell(name, list, reserve) { let cell = window[name]; @@ -649,9 +647,7 @@ function update_cards() { } } -function on_update(state, player) { - game = state; - +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"; @@ -675,7 +671,7 @@ function on_update(state, player) { document.querySelector(".battle_header").textContent = game.battle.title; document.querySelector(".battle_message").textContent = game.battle.flash; document.querySelector(".battle").classList.add("show"); - update_battle(player); + update_battle(); } else { document.querySelector(".battle").classList.remove("show"); } |