From b217b7b161f18cc1a247e49c2b4d4f9c9eb4561d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 14 Aug 2023 20:33:00 +0200 Subject: Easier within 3 hexes checks. --- play.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index 55db288..39d9893 100644 --- a/play.js +++ b/play.js @@ -108,6 +108,8 @@ let ui = { document.getElementById("prussian_detachment_6"), ], stack: new Array(last_hex+1).fill(0), + turn: document.getElementById("marker_turn"), + remain: document.getElementById("marker_remain"), } function toggle_pieces() { @@ -333,9 +335,15 @@ function on_update() { } } + ui.turn.style.left = (40 + TURN_X + (view.turn-1) * TURN_DX) + "px" + ui.turn.classList.toggle("flip", view.rain > 0) + + ui.remain.style.left = (109 + (view.remain % 10) * 47.5 | 0) + "px" + ui.remain.classList.toggle("flip", view.remain > 9) + action_button("roll", "Roll") action_button("next", "Next") - action_button("done", "Done") + action_button("end_step", "End step") action_button("pass", "Pass") action_button("undo", "Undo") } -- cgit v1.2.3