summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/play.js b/play.js
index 3565ae4..ebb70b5 100644
--- a/play.js
+++ b/play.js
@@ -440,7 +440,7 @@ function get_army_xy(s) {
let x, y
if (s >= 66) {
x = data.spaces[s].x
- y = data.spaces[s].y - 80
+ y = data.spaces[s].y - 120
} else {
x = data.spaces[s].x
y = data.spaces[s].y - 40
@@ -452,10 +452,9 @@ function get_static_xy(s) {
let x, y
if (s >= 66) {
x = data.spaces[s].x
- y = data.spaces[s].y + 60
+ y = data.spaces[s].y + 20
} else {
x = data.spaces[s].x - 20
- y = data.spaces[s].y + 15
y = data.spaces[s].y + 10
}
return [ x, y ]
@@ -597,13 +596,15 @@ function on_update() {
if (s === NOWHERE)
continue
- let pos = (s < 66) ? ui.layout_static[s] : get_static_xy(s)
+ let [ x, y ] = (s < 66) ? ui.layout_static[s] : get_static_xy(s)
+ if (s >= 66)
+ y -= 60
+
if (view.move && view.move.who === g)
- pos = ui.layout_move
+ [ x, y ] = ui.layout_move
if (view.react && view.react.who === g)
- pos = ui.layout_react
+ [ x, y ] = ui.layout_react
- let [ x, y ] = pos
ui.generals[g].classList.toggle("selected", view.selected_general === g)