summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-11-09 15:34:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2023-11-09 15:34:43 +0100
commit964cba1f5640113b55a386239b9b8c698c9fafdf (patch)
tree1cca3a414e0e17db2d4ef54312c93be16deb421d /spec
parent92d469aff0b7f02f692d37160e5d0230ce0beb87 (diff)
downloadcolonial-twilight-964cba1f5640113b55a386239b9b8c698c9fafdf.zip
colonial-twilight-964cba1f5640113b55a386239b9b8c698c9fafdf.tar.gz
FLNBotRules : add #pick_guerrillas_from
Diffstat (limited to 'spec')
-rw-r--r--spec/fln_bot_rules_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/fln_bot_rules_spec.rb b/spec/fln_bot_rules_spec.rb
index 328b316..2abe2b8 100644
--- a/spec/fln_bot_rules_spec.rb
+++ b/spec/fln_bot_rules_spec.rb
@@ -651,6 +651,13 @@ describe ColonialTwilight::FLNBotRules do
expect(@rules._remove_guerrillas_priority([a, b, c, d], { d => true })[0]).to be b
end
+ it 'pick guerrillas from most guerrillas' do
+ @rules.board.spaces << Sector.new(fln_active: 2, fln_underground: 1)
+ @rules.board.spaces << (b = Sector.new(fln_active: 2, fln_underground: 2))
+ @rules.board.spaces << Sector.new(fln_active: 1, fln_underground: 2)
+ expect(@rules.pick_guerrillas_from(@rules.board)).to be b
+ end
+
it 'remove_from all' do
a = Sector.new(fln_active: 2, fln_underground: 1, fln_bases: 1)
h = @rules.remove_from(a, 6)