From b21d125966e118914f0442f322eebc298be78824 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Sat, 23 Sep 2023 12:13:11 +0200 Subject: FLNRules : support agitate --- lib/colonial_twilight/fln_rules.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/colonial_twilight/fln_rules.rb b/lib/colonial_twilight/fln_rules.rb index fa07805..dac834b 100644 --- a/lib/colonial_twilight/fln_rules.rb +++ b/lib/colonial_twilight/fln_rules.rb @@ -1,10 +1,11 @@ #! /usr/bin/env ruby # frozen_string_literal: true +# rubocop:disable Style/Documentation +# module ColonialTwilight - # general rules governing operations and activities module FLNRules - # Rally 3.3.1 + # Rally 3.3.1 + France Track def may_rally_in?(space) (space.sector? || (space.city? && !space.support?) || (space.country? && space.independent?)) end @@ -13,6 +14,14 @@ module ColonialTwilight board.search { |s| may_rally_in? s } end + def may_agitate_in?(space) + (!space.country? && (space.fln_control? || space.fln_bases.positive?)) + end + + def agitate_spaces(spaces) + spaces.select { |s| may_agitate_in? s } + end + # March 3.3.2 # Attack 3.3.3 -- cgit v1.2.3