diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-09-13 21:50:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | cadc1dcca1b350672e340f3aee79f5c98df00d92 (patch) | |
tree | 88241ccd35d13396b57f5609cd83c0ddec834140 | |
parent | e9627869e2cba9cfd4c2ba36536e3898f72d09c3 (diff) | |
download | wilderness-war-cadc1dcca1b350672e340f3aee79f5c98df00d92.tar.gz |
Fix "within 2 of" list creation.
-rw-r--r-- | rules.js | 24 |
1 files changed, 8 insertions, 16 deletions
@@ -676,14 +676,10 @@ define_indian("gray", SHAWIANGTO, "Tuscarora") const within_two_of_canajoharie = [ CANAJOHARIE ] for_each_exit(CANAJOHARIE, one => { - if (!set_has(within_two_of_canajoharie, one)) { - set_add(within_two_of_canajoharie, one) - for_each_exit(one, two => { - if (!set_has(within_two_of_canajoharie, two)) { - set_add(within_two_of_canajoharie, two) - } - }) - } + set_add(within_two_of_canajoharie, one) + for_each_exit(one, two => { + set_add(within_two_of_canajoharie, two) + }) }) const within_two_of_gray_settlement = [] @@ -692,14 +688,10 @@ indians.spaces_from_color.gray.forEach(zero => { }) indians.spaces_from_color.gray.forEach(zero => { for_each_exit(zero, one => { - if (!set_has(within_two_of_gray_settlement, one)) { - set_add(within_two_of_gray_settlement, one) - for_each_exit(one, two => { - if (!set_has(within_two_of_gray_settlement, two)) { - set_add(within_two_of_gray_settlement, two) - } - }) - } + set_add(within_two_of_gray_settlement, one) + for_each_exit(one, two => { + set_add(within_two_of_gray_settlement, two) + }) }) }) |