From a64246a8df40773167afd6820a3c7ae54acf1a68 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 16 Oct 2024 21:30:07 +0200 Subject: place hussars --- play.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 60b1690..1c08fbd 100644 --- a/play.js +++ b/play.js @@ -41,8 +41,9 @@ const ELIMINATED_TRAIN_DX = 33 const ELIMINATED_GENERAL_X = 340 const ELIMINATED_GENERAL_Y = 110 const ELIMINATED_GENERAL_DX = 50 -const ELIMINATED_DISC_X = 340 + 75 -const ELIMINATED_DISC_Y = 240 + +const HUSSAR_X = 2190 +const HUSSAR_Y = 1630 const power_class = [ "france", "bavaria", "prussia", "saxony", "pragmatic", "austria" ] const power_name = [ "France", "Bavaria", "Prussia", "Saxony", "Pragmatic", "Austria" ] @@ -726,16 +727,16 @@ function layout_hussar(id, s) { ui.pieces_element.appendChild(e) if (s === ELIMINATED) { - x = ELIMINATED_DISC_X - y = ELIMINATED_DISC_Y + x = HUSSAR_X + y = HUSSAR_Y n = id - 30 } else { x = data.cities.x[s] y = data.cities.y[s] } - e.style.left = (x - 21) + "px" - e.style.top = (y - 29 + 7 - n * 8) + "px" + e.style.left = (x - 21 + n * ELIMINATED_GENERAL_DX) + "px" + e.style.top = (y - 29 + 7) + "px" e.classList.toggle("selected", set_has(view.selected, id)) } -- cgit v1.2.3