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