summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/colonial_twilight/fln_rules.rb3
-rw-r--r--spec/fln_rules_spec.rb4
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