summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/rules.js b/rules.js
index 0fda774..4c0ea2f 100644
--- a/rules.js
+++ b/rules.js
@@ -3026,15 +3026,15 @@ function gen_naval_move() {
if (!piece_can_naval_move_from(moving_piece(), from))
return
if (game.active === BRITAIN) {
- game.amphib.forEach(to => {
+ for (let to of game.amphib) {
if (to !== from)
gen_action_move(from, to)
- })
- ports.forEach(to => {
+ }
+ for (let to of ports) {
if (to !== from && !set_has(game.amphib, to))
if (is_friendly_controlled_space(to))
gen_action_move(from, to)
- })
+ }
}
if (game.active === FRANCE) {
if (from !== LOUISBOURG && is_friendly_controlled_space(LOUISBOURG))
@@ -6460,20 +6460,20 @@ states.go_home_to = {
}
if (has_unbesieged_friendly_leader(from)) {
- find_closest_friendly_unbesieged_fortification(from).forEach(to => {
+ for (let to of find_closest_friendly_unbesieged_fortification(from)) {
can_go_home = true
gen_action_space(to)
- })
+ }
} else if (game.go_home.follow && game.go_home.follow[from]) {
can_go_home = true
game.go_home.follow[from].forEach(gen_action_space)
}
} else {
// Leader alone in the wilderness; or leaders, rangers, and coureurs after raid.
- find_closest_friendly_unbesieged_fortification(from).forEach(to => {
+ for (let to of find_closest_friendly_unbesieged_fortification(from)) {
can_go_home = true
gen_action_space(to)
- })
+ }
}
if (!can_go_home)