summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-31 20:11:02 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:42:59 +0100
commitb6a4fdc6fc83525ceda1451df98baf80ec47d63c (patch)
treedad89d104b3d6115a82cbf46bec5666419510d3d
parent780458180e2488d3c43070fde516b2f4f3b826b6 (diff)
download300-earth-and-water-b6a4fdc6fc83525ceda1451df98baf80ec47d63c.tar.gz
300: Limit transported armies to 3!
-rw-r--r--ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 4806eb5..b6a2510 100644
--- a/ui.js
+++ b/ui.js
@@ -105,7 +105,7 @@ function on_click_army(evt) {
if (ui.selected_armies && ui.selected_armies.includes(evt.target)) {
remove_from_array(ui.selected_armies, evt.target);
} else {
- if (ui.selected_armies.length < ui.selected_fleets.length)
+ if (ui.selected_armies.length < ui.selected_fleets.length && ui.selected_armies.length < 3)
ui.selected_armies.push(here[ui.selected_armies.length]);
}
}