From 6b60dab5bf2c3b195b70596727e4023693b85cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 2 Nov 2023 18:27:09 +0100 Subject: FLNBotRules place_guerrillas -> place_guerrillas_priority --- lib/colonial_twilight/fln_bot_rules.rb | 4 ++-- spec/fln_bot_rules_spec.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/colonial_twilight/fln_bot_rules.rb b/lib/colonial_twilight/fln_bot_rules.rb index 450de2d..4fc6347 100644 --- a/lib/colonial_twilight/fln_bot_rules.rb +++ b/lib/colonial_twilight/fln_bot_rules.rb @@ -187,8 +187,8 @@ module ColonialTwilight # 2) place: underground first unless from map then place active first flipped as underground # 3) march: underground -> active, unless march would activate then move active first - # applied as last filter in FLNBot#_place_fln - def place_guerrillas(spaces) + # applied as last filter in FLNBot#_priority + def place_guerrillas_priority(spaces) # 4) support -> with friendly pieces -> random f = _filter(spaces, &:support?) _filter(f) { |s| s.guerrillas.positive? } diff --git a/spec/fln_bot_rules_spec.rb b/spec/fln_bot_rules_spec.rb index 612e32d..0004d7a 100644 --- a/spec/fln_bot_rules_spec.rb +++ b/spec/fln_bot_rules_spec.rb @@ -489,18 +489,18 @@ describe ColonialTwilight::FLNBotRules do expect(@rules._removable_guerrillas(a)).to eq(2) end - it 'place_guerrillas support' do + it 'place_guerrillas_priority support' do a = Sector.new(support: false) b = Sector.new(support: true) c = Sector.new(support: false) - expect(@rules.place_guerrillas([a, b, c])[0]).to be b + expect(@rules.place_guerrillas_priority([a, b, c])[0]).to be b end - it 'place_guerrillas support and fln_active' do + it 'place_guerrillas_priority support and fln_active' do a = Sector.new(support: false) b = Sector.new(support: true, fln_active: 1) c = Sector.new(support: true) - expect(@rules.place_guerrillas([a, b, c])[0]).to be b + expect(@rules.place_guerrillas_priority([a, b, c])[0]).to be b end it '_remove_guerrillas_priority none' do -- cgit v1.1-2-g2b99