summaryrefslogtreecommitdiffstats
path: root/spec/fln_bot_rules_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-10-26 10:03:52 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2023-10-26 10:03:52 +0200
commit0d389b3c5a4cd50307af262666c7df01df33c6f6 (patch)
tree3a2e8421335f664390ffea2e4bde84606262f200 /spec/fln_bot_rules_spec.rb
parent88b968a4a3bf84d4e60c1b150a25c46e7a84e97c (diff)
downloadcolonial-twilight-0d389b3c5a4cd50307af262666c7df01df33c6f6.zip
colonial-twilight-0d389b3c5a4cd50307af262666c7df01df33c6f6.tar.gz
FLNBotRules : rally 6 checks agitate
Diffstat (limited to 'spec/fln_bot_rules_spec.rb')
-rw-r--r--spec/fln_bot_rules_spec.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/fln_bot_rules_spec.rb b/spec/fln_bot_rules_spec.rb
index 8667a11..2b9ddde 100644
--- a/spec/fln_bot_rules_spec.rb
+++ b/spec/fln_bot_rules_spec.rb
@@ -265,8 +265,20 @@ describe ColonialTwilight::FLNBotRules do
expect(@rules.may_rally_6_in?(a, false)).to be false
end
- it 'may_rally_6_in? pop 1+' do
- a = Sector.new({ pop: 2 })
+ it 'may_rally_6_in? pop 2+ but no base, no control after' do
+ a = Sector.new({ pop: 2, gov_cubes: 1 })
+ @board.available_fln_underground = 1
+ expect(@rules.may_rally_6_in?(a, false)).to be false
+ end
+
+ it 'may_rally_6_in? pop 2+ and base' do
+ a = Sector.new({ pop: 2, gov_cubes: 6, fln_bases: 1 })
+ expect(@rules.may_rally_6_in?(a, false)).to be true
+ end
+
+ it 'may_rally_6_in? pop 2+ and control' do
+ a = Sector.new({ pop: 2, gov_cubes: 1, fln_active: 1 })
+ @board.available_fln_underground = 1
expect(@rules.may_rally_6_in?(a, false)).to be true
end