summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/colonial_twilight/fln_rules.rb2
-rw-r--r--lib/colonial_twilight/forces.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/colonial_twilight/fln_rules.rb b/lib/colonial_twilight/fln_rules.rb
index 5f8fd48..f260dea 100644
--- a/lib/colonial_twilight/fln_rules.rb
+++ b/lib/colonial_twilight/fln_rules.rb
@@ -20,7 +20,7 @@ module ColonialTwilight
board.search(&method(:may_agitate_in?))
end
- def max_fln_to_place_in(space)
+ def max_placable_flns(space)
space.fln_bases.positive? ? space.fln_bases + space.pop - space.fln_cubes : 1
end
diff --git a/lib/colonial_twilight/forces.rb b/lib/colonial_twilight/forces.rb
index 2048a00..4991c89 100644
--- a/lib/colonial_twilight/forces.rb
+++ b/lib/colonial_twilight/forces.rb
@@ -130,8 +130,9 @@ module ColonialTwilight
end
def update_control
- return if @control.nil?
+ return nil if @control.nil?
+ ctr = @control
@control = (
case gov <=> fln
when 0 then :uncontrolled
@@ -139,6 +140,7 @@ module ColonialTwilight
when -1 then :FLN
end
)
+ @control != ctr
end
end
end