Module: BehaviorTree::TreeStructure::Printer

Included in:
BehaviorTree::Tree
Defined in:
lib/behavior_tree/concerns/tree_structure/printer.rb

Overview

Algorithm to print tree.

Instance Method Summary collapse

Instance Method Details



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/behavior_tree/concerns/tree_structure/printer.rb', line 9

def print
  lines = []
  lines << '' # Style for the root node.
  lines += tree_lines
  lines << ''
  lines << cycle_string
  lines << uniq_nodes_string
  lines << size_string
  lines << tree_tick_count_string

  puts lines.join "\n"
end