diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2023-11-09 15:34:55 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2023-11-09 15:34:55 +0100 |
commit | ecbfcec57a5dc19b9fcebdd80af7d4968685bb15 (patch) | |
tree | 72e6a56842c20905c0d8e0c2ba48f8e91849ab9d | |
parent | 964cba1f5640113b55a386239b9b8c698c9fafdf (diff) | |
download | colonial-twilight-ecbfcec57a5dc19b9fcebdd80af7d4968685bb15.zip colonial-twilight-ecbfcec57a5dc19b9fcebdd80af7d4968685bb15.tar.gz |
FLNBotRules : small fixes
-rw-r--r-- | lib/colonial_twilight/fln_bot_rules.rb | 6 |
1 files 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 |