From ecbfcec57a5dc19b9fcebdd80af7d4968685bb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 9 Nov 2023 15:34:55 +0100 Subject: FLNBotRules : small fixes --- lib/colonial_twilight/fln_bot_rules.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/colonial_twilight/fln_bot_rules.rb b/lib/colonial_twilight/fln_bot_rules.rb index 4294136..1df9209 100644 --- a/lib/colonial_twilight/fln_bot_rules.rb +++ b/lib/colonial_twilight/fln_bot_rules.rb @@ -231,7 +231,7 @@ module ColonialTwilight s = spaces.sample n -= h[s] = (g = _removable_guerrillas(s)) >= n ? n : g end - h.reject { |_k, v| v.zero? } # FIXME in empty? maybe hide active guerrillas ? + h.reject { |_k, v| v.zero? } # FIXME: in empty? maybe hide active guerrillas ? end def pick_guerrillas_from(board = @board) @@ -264,11 +264,11 @@ module ColonialTwilight end # place_guerrillas_in - def _remove_guerrillas_priority(spaces, selected) + def _remove_guerrillas_priority(spaces, selected = {}) # 5) #removable_guerrillas then most guerrillas first return [] if (l = _not_selected(spaces, selected).select { |s| _removable_guerrillas(s).positive? }).empty? - _max(l, :guerrillas).shuffle + _max(l, :guerrillas) end # not used yet -- cgit v1.1-2-g2b99