samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
def process_input_heuristic_target
    old_target = grid.target.clone
    unless heuristic_cell_closest_to_mouse == grid.star
      grid.target = heuristic_cell_closest_to_mouse
    end
    unless old_target == grid.target
      recalculate_searches
    end
  end
# Moves the target to the cell closest to the mouse in the second grid
# Only recalculate_searchess 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 recalculate_searchess 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 recalculate_searchess the search if the target changes position Called whenever the user is editing the target ( puts mouse down on target )
def process_input_heuristic_target
    old_target = grid.target.clone
    unless heuristic_cell_closest_to_mouse == grid.star
      grid.target = heuristic_cell_closest_to_mouse
    end
    unless old_target == grid.target
      recalculate_searches
    end
  end
def process_input_heuristic_target old_target = grid . target . clone unless heuristic_cell_closest_to_mouse == grid . star grid . target = heuristic_cell_closest_to_mouse end unless old_target == grid . target recalculate_searches end end
Moves the target to the cell closest to the mouse in the second grid
Only recalculate_searchess 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 recalculate_searchess the search if the target changes position Called whenever the user is editing the target ( puts mouse down on target )