From b3d5b71b90410baf44157a5e38fae78bd26a05b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 9 Nov 2023 17:21:56 +0100 Subject: FLNBotRules : place_guerrilas_in return empty? if no placeable guerrilas --- spec/fln_bot_rules_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/fln_bot_rules_spec.rb b/spec/fln_bot_rules_spec.rb index 2abe2b8..a5fc00d 100644 --- a/spec/fln_bot_rules_spec.rb +++ b/spec/fln_bot_rules_spec.rb @@ -608,6 +608,15 @@ describe ColonialTwilight::FLNBotRules do expect(h[@board.spaces[0]]).to eq(1) end + it 'place_guerrillas_in' do + a = Sector.new(pop: 2, fln_bases: 1) + @board.available_fln_underground = 0 + h = @rules.place_guerrillas_in(a) + expect(@rules.max_placable_guerrillas_in?(a)).to eq(3) + expect(h[:available]).to be nil + expect(h.empty?).to be true + end + it '_removable_guerrillas active' do a = Sector.new(fln_active: 2, fln_underground: 3) expect(@rules._removable_guerrillas(a)).to eq(2) -- cgit v1.1-2-g2b99