samples/13_path_finding_algorithms/05_dijkstra/app/main.rb
def input_target2
    old_target = state.target.clone
    unless cell_closest_to_mouse2 == state.star
      state.target = cell_closest_to_mouse2
    end
    unless old_target == state.target
      reset_search
    end
  end
# Moves the target to the cell closest to the mouse in the second grid
# Only reset_searchs the search if the target changes position
# Called whenever the user is editing the target (puts mouse down on target)
Moves the target to the cell closest to the mouse in the second grid
Only reset_searchs the search if the target changes position
Called whenever the user is editing the target (puts mouse down on target)
Moves the target to the cell closest to the mouse in the second grid Only reset_searchs the search if the target changes position Called whenever the user is editing the target ( puts mouse down on target )
def input_target2
    old_target = state.target.clone
    unless cell_closest_to_mouse2 == state.star
      state.target = cell_closest_to_mouse2
    end
    unless old_target == state.target
      reset_search
    end
  end
def input_target2 old_target = state . target . clone unless cell_closest_to_mouse2 == state . star state . target = cell_closest_to_mouse2 end unless old_target == state . target reset_search end end
Moves the target to the cell closest to the mouse in the second grid
Only reset_searchs the search if the target changes position
Called whenever the user is editing the target (puts mouse down on target)
Moves the target to the cell closest to the mouse in the second grid Only reset_searchs the search if the target changes position Called whenever the user is editing the target ( puts mouse down on target )