summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js4
-rw-r--r--rules.ts6
2 files changed, 4 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index 714a227..a66f665 100644
--- a/rules.js
+++ b/rules.js
@@ -2355,12 +2355,12 @@ function resolve_final_bid() {
}
resolve_active_and_proceed();
}
-function get_fronts_to_add_to(target, not = []) {
+function get_fronts_to_add_to(target, not) {
if (target === data_1.CLOSEST_TO_DEFEAT || target === data_1.CLOSEST_TO_VICTORY) {
return get_fronts_closest_to(target);
}
else if (target === data_1.ANY) {
- return data_1.FRONTS.filter((id) => game.fronts[id].status === null && !not.includes(id));
+ return data_1.FRONTS.filter((id) => game.fronts[id].status === null && id !== not);
}
else if (game.fronts[target].status === data_1.DEFEAT) {
return get_fronts_closest_to(data_1.CLOSEST_TO_DEFEAT);
diff --git a/rules.ts b/rules.ts
index c88b8d7..36efee3 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2928,14 +2928,12 @@ function resolve_final_bid() {
function get_fronts_to_add_to(
target: string | number,
- not: FrontId[] = []
+ not?: FrontId
): FrontId[] {
if (target === CLOSEST_TO_DEFEAT || target === CLOSEST_TO_VICTORY) {
return get_fronts_closest_to(target);
} else if (target === ANY) {
- return FRONTS.filter(
- (id) => game.fronts[id].status === null && !not.includes(id)
- );
+ return FRONTS.filter((id) => game.fronts[id].status === null && id !== not);
} else if (game.fronts[target].status === DEFEAT) {
return get_fronts_closest_to(CLOSEST_TO_DEFEAT);
} else if (game.fronts[target].status === VICTORY) {