From 65ca540db89363f2a20c7b32005de400490cdaae Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:36:41 +0200 Subject: fln deployment --- play.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'play.js') diff --git a/play.js b/play.js index 7d4ea47..d1a3339 100644 --- a/play.js +++ b/play.js @@ -114,6 +114,10 @@ function is_area_remote(l) { return (view.areas[l] & AREA_REMOTE_MASK) === AREA_REMOTE_MASK } +function is_area_country(l) { + return data.areas[l].type === COUNTRY +} + // === UNIT STATE === // location (8 bits), op box (2 bits), dispersed (1 bit), airmobile (1 bit), neutralized (1 bit) @@ -401,6 +405,10 @@ function update_map() { ui.eliminated.appendChild(e) } else { let box_id = unit_box(u) + if (is_area_country(loc)) { + // only single box in France, Morocco and Tunisia + box_id = 0 + } if (!ui.boxes[loc * 4 + box_id].contains(e)) ui.boxes[loc * 4 + box_id].appendChild(e) } -- cgit v1.2.3