samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
def input_next_step_button
    if right_button_clicked?
      state.play = false
      state.anim_steps += 1
      calc
    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
Checks if the next step button is clicked If it is it pauses the animation and moves the search one step forward
def input_next_step_button
    if right_button_clicked?
      state.play = false
      state.anim_steps += 1
      calc
    end
  end
def input_next_step_button if right_button_clicked? state . play = false state . anim_steps += 1 calc 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