summaryrefslogtreecommitdiffstats
path: root/spec/fln_rules_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/fln_rules_spec.rb')
-rw-r--r--spec/fln_rules_spec.rb28
1 files changed, 21 insertions, 7 deletions
diff --git a/spec/fln_rules_spec.rb b/spec/fln_rules_spec.rb
index 9a8c39c..fe8e301 100644
--- a/spec/fln_rules_spec.rb
+++ b/spec/fln_rules_spec.rb
@@ -25,17 +25,31 @@ describe ColonialTwilight::FLNRules do
expect(rules.rally_spaces(@board).size).to eq(27)
end
+ it 'may_rally_in? not in city at support' do
+ a = ColonialTwilight::City.new('a', 'w', 0, 0)
+ a.shift :support
+ expect(rules.may_rally_in?(a)).to be false
+ end
+
+ it 'may_rally_in? not in not independent country' do
+ a = ColonialTwilight::Country.new('country')
+ expect(rules.may_rally_in?(a)).to be false
+ end
+
+ it 'may_rally_in?' do
+ a = ColonialTwilight::Sector.new('a', 'w', 0, 0)
+ expect(rules.may_rally_in?(a)).to be true
+ end
+
it 'may place 1 FLN cube' do
- @board.load :short
- space = @board.by_name('Mostaganem')
- expect(rules.max_placable_guerrillas(space)).to eq(1)
+ a = ColonialTwilight::Sector.new('a', 'w', 0, 0)
+ expect(rules.max_placable_guerrillas(a)).to eq(1)
end
it 'may place 2 FLN cube' do
- @board.load :short
- space = @board.by_name('Orleansville')
- space.add :fln_base
- expect(rules.max_placable_guerrillas(space)).to eq(4)
+ a = ColonialTwilight::Sector.new('a', 'w', 0, 2)
+ a.add :fln_base
+ expect(rules.max_placable_guerrillas(a)).to eq(3)
end
end