diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-07-03 23:47:32 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-08-21 00:28:20 +0200 |
commit | d4bfa6838b1a4e7ace1766cb27a3233c881cadfc (patch) | |
tree | 3d0a396a1366cf14ea0d150452614fefc13c81ab | |
parent | d1f2074e7e547e15ace1cb79e0ab45a7cc43e9d0 (diff) | |
download | washingtons-war-d4bfa6838b1a4e7ace1766cb27a3233c881cadfc.tar.gz |
layout french
-rw-r--r-- | play.js | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -525,17 +525,20 @@ function on_update() { if (view.react && view.react.who === g) [ x, y ] = get_army_xy_lerp(view.react.from, view.react.to) - if (s !== FRENCH_REINFORCEMENTS && count_french_cu(s) > 0) - x += 30 - if (view.move && view.move.who === g) { ui.generals[g].classList.add("selected") + if (view.move.carry_french > 0 && view.move.carry_american > 0) + x += 30 x += 30 } else if (view.react && view.react.who === g) { ui.generals[g].classList.add("selected") + if (view.react.carry_french > 0 && view.react.carry_american > 0) + x += 30 x += 30 } else { ui.generals[g].classList.remove("selected") + if (count_french_cu(s) > 0 && count_american_cu(s) > 0) + x += 30 if (s < 66) { let offset = general_offset(g) x += offset * (45 + 9) @@ -546,10 +549,8 @@ function on_update() { let off_x = offset % 3 let off_y = offset / 3 | 0 let ctr_x = total > 3 ? 3 : total - off_x -= (ctr_x - 1) / 2 // off_y -= (total / 3 | 0) / 2 - x += off_x * (45 + 9) y += off_y * (45 + 9) y -= 15 |