samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
# This method is called every frame/tick
# Every tick, the current state of the search is rendered on the screen,
# User input is processed, and
# The next step in the search is calculated
This method is called every frame/tick
Every tick, the current state of the search is rendered on the screen,
User input is processed, and
The next step in the search is calculated
This method is called every frame / tick Every tick the current state of the search is rendered on the screen User input is processed and The next step in the search is calculated
def tick
    render
    input
    if state.play && state.anim_steps < state.max_steps
      state.anim_steps += 1
      calc
    end
  end
def tick render input if state . play && state . anim_steps < state . max_steps state . anim_steps += 1 calc end end
This method is called every frame/tick
Every tick, the current state of the search is rendered on the screen,
User input is processed, and
The next step in the search is calculated
This method is called every frame / tick Every tick the current state of the search is rendered on the screen User input is processed and The next step in the search is calculated
# If animation is playing, and max steps have not been reached # Move the search a step forward # Variable that tells the program what step to recalculate up to