From e42ecf6768f1b1a39c2357334b4ae2cd49f29b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 30 Oct 2023 14:18:21 +0100 Subject: FLNRules : fix #may_extort_in? --- lib/colonial_twilight/fln_rules.rb | 3 +-- spec/fln_rules_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/colonial_twilight/fln_rules.rb b/lib/colonial_twilight/fln_rules.rb index a472844..9e3bddd 100644 --- a/lib/colonial_twilight/fln_rules.rb +++ b/lib/colonial_twilight/fln_rules.rb @@ -50,8 +50,7 @@ module ColonialTwilight # Extort 4.3.1 def may_extort_in?(space) - !space.pop.zero? && space.fln_underground.positive? && space.fln_control? && - (space.country? ? space.independent? : true) + space.fln_underground.positive? && (space.country? ? space.independent? : !space.pop.zero? && space.fln_control?) end def extort_spaces(board) diff --git a/spec/fln_rules_spec.rb b/spec/fln_rules_spec.rb index 9a4ebdc..6a39759 100644 --- a/spec/fln_rules_spec.rb +++ b/spec/fln_rules_spec.rb @@ -116,8 +116,8 @@ describe ColonialTwilight::FLNRules do it 'collects spaces where operation can be conducted' do @board.load :short - # 2 sectors - expect(rules.extort_spaces(@board).size).to eq(2) + # 2 sectors + 2 countries + expect(rules.extort_spaces(@board).size).to eq(4) end end -- cgit v1.1-2-g2b99