summaryrefslogtreecommitdiffstats
path: root/spec/mock_board.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-10-24 13:18:51 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2023-10-24 13:18:51 +0200
commit3011fbf0561570c0962e169a2d62d327edf19771 (patch)
treea3ddadfb9f6c514535df672b64f9141961c776bd /spec/mock_board.rb
parent15298b7b3bc8facb1f350b7ab4ce9ec2fae50599 (diff)
downloadcolonial-twilight-3011fbf0561570c0962e169a2d62d327edf19771.zip
colonial-twilight-3011fbf0561570c0962e169a2d62d327edf19771.tar.gz
FLNBotRules : add #place_guerrillas_in, fix rally_7
Diffstat (limited to 'spec/mock_board.rb')
-rw-r--r--spec/mock_board.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/mock_board.rb b/spec/mock_board.rb
index e75ba73..34c5272 100644
--- a/spec/mock_board.rb
+++ b/spec/mock_board.rb
@@ -57,19 +57,33 @@ class Sector
@data[:fln_underground] || 0
end
+ def fln
+ fln_active + fln_underground + fln_bases
+ end
+
def gov_cubes
@data[:gov_cubes] || 0
end
+
+ def gov_bases
+ @data[:gov_bases] || 0
+ end
+
+ def gov
+ gov_cubes + gov_bases
+ end
end
class Board
- attr_reader :sector
- attr_accessor :fln_resources, :available_fln_bases
+ attr_reader :sector, :spaces
+ attr_accessor :fln_resources, :available_fln_underground, :available_fln_bases
def initialize
@fln_resources = 0
@available_fln_bases = 1
+ @available_fln_underground = 0
@sector = Sector.new
+ @spaces = []
end
def has(&block)