From 23073ffb11a0a8ea1437933618b98e8d18b2f7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 9 Oct 2023 09:48:24 +0200 Subject: fix FLNRules#max_fln_to_place_in --- lib/colonial_twilight/fln_rules.rb | 2 +- spec/fln_rules_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/colonial_twilight/fln_rules.rb b/lib/colonial_twilight/fln_rules.rb index 481a6ee..5f8fd48 100644 --- a/lib/colonial_twilight/fln_rules.rb +++ b/lib/colonial_twilight/fln_rules.rb @@ -21,7 +21,7 @@ module ColonialTwilight end def max_fln_to_place_in(space) - space.fln_bases.positive? ? space.pop + 1 - space.fln_cubes : 1 + space.fln_bases.positive? ? space.fln_bases + space.pop - space.fln_cubes : 1 end # March 3.3.2 diff --git a/spec/fln_rules_spec.rb b/spec/fln_rules_spec.rb index d266cb4..385972a 100644 --- a/spec/fln_rules_spec.rb +++ b/spec/fln_rules_spec.rb @@ -34,7 +34,8 @@ describe ColonialTwilight::FLNRules do it 'may place 2 FLN cube' do @board.load :short space = @board.by_name('Orleansville') - expect(rules.max_fln_to_place_in(space)).to eq(2) + space.add :fln_base + expect(rules.max_fln_to_place_in(space)).to eq(3) end end -- cgit v1.1-2-g2b99