summaryrefslogtreecommitdiffstats
path: root/lib/colonial_twilight
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-12-02 22:57:38 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2023-12-02 22:57:38 +0100
commit7e94c38bc75cc0393e140e23df5531927acc87d7 (patch)
tree53eddac159d9c53ad7a8b35d9962b3b6f44ace8c /lib/colonial_twilight
parent6829aa96f06ee2fc3eb20cb124611827928d16a3 (diff)
downloadcolonial-twilight-7e94c38bc75cc0393e140e23df5531927acc87d7.zip
colonial-twilight-7e94c38bc75cc0393e140e23df5531927acc87d7.tar.gz
FLNBotRules : rewrite priority specs and fix rally_7_priority
Diffstat (limited to 'lib/colonial_twilight')
-rw-r--r--lib/colonial_twilight/fln_bot_rules.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/colonial_twilight/fln_bot_rules.rb b/lib/colonial_twilight/fln_bot_rules.rb
index 30fe9ec..90936ad 100644
--- a/lib/colonial_twilight/fln_bot_rules.rb
+++ b/lib/colonial_twilight/fln_bot_rules.rb
@@ -125,8 +125,8 @@ module ColonialTwilight
def rally_7_priority(spaces)
# highest population -> gain FLN control -> remove Gov control -> city -> least terror
f = _max(spaces, :pop)
- f = _filter(f) { |s| s.gov < s.fln + place_guerrillas_in(s).values.sum }
- f = _filter(f) { |s| s.gov == s.fln + place_guerrillas_in(s).values.sum }
+ f = _filter(f) { |s| s.gov >= s.fln && s.gov < s.fln + place_guerrillas_in(s).values.sum }
+ f = _filter(f) { |s| s.gov >= s.fln && s.gov == s.fln + place_guerrillas_in(s).values.sum }
f = _filter(f, &:city?)
_min(f, :terror)
end