From d059b9babc8e92b272fbf11d3801a47313a02d07 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 20 Mar 2025 01:35:43 +0100 Subject: possible fix for get_fronts_to_add_to ("not" as single front) --- rules.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'rules.ts') 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) { -- cgit v1.2.3