diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2023-11-09 17:21:56 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2023-11-09 17:21:56 +0100 |
commit | b3d5b71b90410baf44157a5e38fae78bd26a05b8 (patch) | |
tree | 3b28ff365a480dca04320fe84a85024f5941ced7 /spec | |
parent | ecbfcec57a5dc19b9fcebdd80af7d4968685bb15 (diff) | |
download | colonial-twilight-b3d5b71b90410baf44157a5e38fae78bd26a05b8.zip colonial-twilight-b3d5b71b90410baf44157a5e38fae78bd26a05b8.tar.gz |
FLNBotRules : place_guerrilas_in return empty? if no placeable guerrilas
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fln_bot_rules_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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) |