summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-16 21:30:07 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-16 22:38:19 +0200
commita64246a8df40773167afd6820a3c7ae54acf1a68 (patch)
treec5207058c38be9eecb1c10d9bf87bcfb95f80b5f /play.js
parent4beb78140f7d71ca546c30bada088390b1cecb26 (diff)
downloadmaria-a64246a8df40773167afd6820a3c7ae54acf1a68.tar.gz
place hussars
Diffstat (limited to 'play.js')
-rw-r--r--play.js13
1 files changed, 7 insertions, 6 deletions
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))
}