summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-13 21:50:01 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commitcadc1dcca1b350672e340f3aee79f5c98df00d92 (patch)
tree88241ccd35d13396b57f5609cd83c0ddec834140 /rules.js
parente9627869e2cba9cfd4c2ba36536e3898f72d09c3 (diff)
downloadwilderness-war-cadc1dcca1b350672e340f3aee79f5c98df00d92.tar.gz
Fix "within 2 of" list creation.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js24
1 files changed, 8 insertions, 16 deletions
diff --git a/rules.js b/rules.js
index 8cd4b9c..87b4763 100644
--- a/rules.js
+++ b/rules.js
@@ -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)
+ })
})
})