summaryrefslogtreecommitdiffstats
path: root/lib/colonial_twilight
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-09-03 16:07:42 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-09-03 16:07:42 +0200
commit75b0668650af1111a7de4b7420d2ae928595a23b (patch)
tree9944f5e8e0dfa98e6042a0b61c441b08f6677b19 /lib/colonial_twilight
parentfeeb4c01216a1184f76c670cf790cb59898efef3 (diff)
downloadcolonial-twilight-75b0668650af1111a7de4b7420d2ae928595a23b.zip
colonial-twilight-75b0668650af1111a7de4b7420d2ae928595a23b.tar.gz
Player : add #debug_selected_spaces
Diffstat (limited to 'lib/colonial_twilight')
-rw-r--r--lib/colonial_twilight/fln_bot.rb6
-rw-r--r--lib/colonial_twilight/player.rb4
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/colonial_twilight/fln_bot.rb b/lib/colonial_twilight/fln_bot.rb
index ed1c2b4..3c00b26 100644
--- a/lib/colonial_twilight/fln_bot.rb
+++ b/lib/colonial_twilight/fln_bot.rb
@@ -426,7 +426,7 @@ module ColonialTwilight
if @debug
puts "=> Rally done :\n\texpended resources : #{@expended_resources} #{}"
- puts "\tselected spaces :: " + @selected_spaces.collect(){|s| s.is_a?(Symbol) ? s.to_s : s.name}.join(' :: ')
+ debug_selected_spaces
end
subvert if may_conduct_special_activity? :subvert
@@ -598,8 +598,8 @@ module ColonialTwilight
if OPERATIONS.include? action
operation_done action
raise "already selected #{selected.name}" if @selected_spaces.include? selected
- @selected_spaces << selected #unless @selected_spaces.include? selected
- puts 'selected spaces :: ' + @selected_spaces.collect(){|s| s.is_a?(Symbol) ? s.to_s : s.name}.join(' :: ') if @debug
+ @selected_spaces << selected
+ debug_selected_spaces
elsif SPECIAL_ACTIVITIES.include? action
special_activity_done action
@selected_spaces << selected if action == :ambush
diff --git a/lib/colonial_twilight/player.rb b/lib/colonial_twilight/player.rb
index bc91cd1..f8ed62c 100644
--- a/lib/colonial_twilight/player.rb
+++ b/lib/colonial_twilight/player.rb
@@ -90,6 +90,10 @@ module ColonialTwilight
@special_activity_count += 1
end
+ def debug_selected_spaces
+ puts "\tselected spaces :: " + @selected_spaces.collect(){|s| s.is_a?(Symbol) ? s.to_s : s.name}.join(' :: ') if @debug
+ end
+
end
end