samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
def input_left_button 
    if left_button_clicked?
      unless state.anim_steps == 0
        state.anim_steps -= 1
        recalculate
      end
    end
  end
# Checks if the previous step button is clicked
# If it is, it pauses the animation and moves the search one step backward
Checks if the previous step button is clicked
If it is, it pauses the animation and moves the search one step backward
Checks if the previous step button is clicked If it is it pauses the animation and moves the search one step backward
def input_left_button 
    if left_button_clicked?
      unless state.anim_steps == 0
        state.anim_steps -= 1
        recalculate
      end
    end
  end
def input_left_button if left_button_clicked? unless state . anim_steps == 0 state . anim_steps -= 1 recalculate end end end
Checks if the previous step button is clicked
If it is, it pauses the animation and moves the search one step backward
Checks if the previous step button is clicked If it is it pauses the animation and moves the search one step backward