samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
def render_left_button
    # Draws the gray button, and a black border
    # The border separates the buttons visually
    outputs.solids  << [buttons.left, gray]
    outputs.borders << [buttons.left, black]

    # Renders an explanatory label in the center of the button
    # Explains to the user what the button does
    # If the button size is changed, the label might need to be edited as well
    # to keep the label in the center of the button
    label_x = buttons.left.x + 20
    label_y = buttons.left.y + 35
    outputs.labels  << [label_x, label_y, "<"]
  end
# Draws the button which steps the search backward
# Shows the user where to click to move the search backward
Draws the button which steps the search backward
Shows the user where to click to move the search backward
Draws the button which steps the search backward Shows the user where to click to move the search backward
def render_left_button
    outputs.solids  << [buttons.left, gray]
    outputs.borders << [buttons.left, black]
    label_x = buttons.left.x + 20
    label_y = buttons.left.y + 35
    outputs.labels  << [label_x, label_y, "<"]
  end
def render_left_button outputs . solids << [ buttons . left , gray ] outputs . borders << [ buttons . left , black ] label_x = buttons . left . x + 20 label_y = buttons . left . y + 35 outputs . labels << [ label_x , label_y , "<" ] end
Draws the button which steps the search backward
Shows the user where to click to move the search backward
Draws the button which steps the search backward Shows the user where to click to move the search backward
# Draws the gray button, and a black border # The border separates the buttons visually # Renders an explanatory label in the center of the button # Explains to the user what the button does # If the button size is changed, the label might need to be edited as well # to keep the label in the center of the button