summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-10-30 10:48:28 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2023-10-30 10:48:28 +0100
commit38f37a646f25dc3ce81e540419fe63f215c43068 (patch)
treef79b0c67e8b3d14c99eb05383ea5631ba4f83121 /spec
parent7311f07e16fc73c06d2ac601995c0955d83ac83c (diff)
downloadcolonial-twilight-38f37a646f25dc3ce81e540419fe63f215c43068.zip
colonial-twilight-38f37a646f25dc3ce81e540419fe63f215c43068.tar.gz
FLNRules : may_agitate_in? only if terror || \!oppose
Diffstat (limited to 'spec')
-rw-r--r--spec/fln_rules_spec.rb4
-rw-r--r--spec/mock_board.rb6
2 files changed, 7 insertions, 3 deletions
diff --git a/spec/fln_rules_spec.rb b/spec/fln_rules_spec.rb
index 1b55288..ce9b384 100644
--- a/spec/fln_rules_spec.rb
+++ b/spec/fln_rules_spec.rb
@@ -69,8 +69,8 @@ describe ColonialTwilight::FLNRules do
it 'collects spaces where operation can be conducted' do
@board.load :short
- # 6 with bases + 1 in fln control
- expect(rules.agitate_spaces(@board).size).to eq(5)
+ # 4 with bases + 1 in fln control : but only 1 without fln control
+ expect(rules.agitate_spaces(@board).size).to eq(1)
end
end
diff --git a/spec/mock_board.rb b/spec/mock_board.rb
index 34c5272..e03be2b 100644
--- a/spec/mock_board.rb
+++ b/spec/mock_board.rb
@@ -30,7 +30,11 @@ class Sector
end
def support?
- @data[:support]
+ @data[:support] || false
+ end
+
+ def oppose?
+ @data[:oppose] || false
end
def terror