diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-16 21:30:07 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-16 22:38:19 +0200 |
commit | a64246a8df40773167afd6820a3c7ae54acf1a68 (patch) | |
tree | c5207058c38be9eecb1c10d9bf87bcfb95f80b5f /play.js | |
parent | 4beb78140f7d71ca546c30bada088390b1cecb26 (diff) | |
download | maria-a64246a8df40773167afd6820a3c7ae54acf1a68.tar.gz |
place hussars
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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)) } |