samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
# Checks if the next step button is clicked
# If it is, it pauses the animation and moves the search one step forward
Checks if the next step button is clicked
If it is, it pauses the animation and moves the search one step forward
Checks if the next step button is clicked If it is it pauses the animation and moves the search one step forward
def input_right_button
    if right_button_clicked?
      unless state.anim_steps == state.max_steps
        state.anim_steps += 1           
        calc
      end
    end
  end
def input_right_button if right_button_clicked? unless state . anim_steps == state . max_steps state . anim_steps += 1 calc end end end
Checks if the next step button is clicked
If it is, it pauses the animation and moves the search one step forward
Checks if the next step button is clicked If it is it pauses the animation and moves the search one step forward
# Although normally recalculate would be called here # because the right button only moves the search forward # We can just do that