summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
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))
}