samples/13_path_finding_algorithms/08_a_star/app/main.rb
# Processes click and drag based on what the user is currently dragging
Processes click and drag based on what the user is currently dragging
Processes click and drag based on what the user is currently dragging
def process_input
    if state.user_input == :dijkstra_star
      process_input_dijkstra_star
    elsif state.user_input == :greedy_star
      process_input_greedy_star
    elsif state.user_input == :a_star_star
      process_input_a_star_star
    elsif state.user_input == :dijkstra_target
      process_input_dijkstra_target
    elsif state.user_input == :greedy_target
      process_input_greedy_target
    elsif state.user_input == :a_star_target
      process_input_a_star_target
    elsif state.user_input == :dijkstra_remove_wall
      process_input_dijkstra_remove_wall
    elsif state.user_input == :greedy_remove_wall
      process_input_greedy_remove_wall
    elsif state.user_input == :a_star_remove_wall
      process_input_a_star_remove_wall
    elsif state.user_input == :dijkstra_add_wall
      process_input_dijkstra_add_wall
    elsif state.user_input == :greedy_add_wall
      process_input_greedy_add_wall
    elsif state.user_input == :a_star_add_wall
      process_input_a_star_add_wall
    end
  end
def process_input if state . user_input == :dijkstra_star process_input_dijkstra_star elsif state . user_input == :greedy_star process_input_greedy_star elsif state . user_input == :a_star_star process_input_a_star_star elsif state . user_input == :dijkstra_target process_input_dijkstra_target elsif state . user_input == :greedy_target process_input_greedy_target elsif state . user_input == :a_star_target process_input_a_star_target elsif state . user_input == :dijkstra_remove_wall process_input_dijkstra_remove_wall elsif state . user_input == :greedy_remove_wall process_input_greedy_remove_wall elsif state . user_input == :a_star_remove_wall process_input_a_star_remove_wall elsif state . user_input == :dijkstra_add_wall process_input_dijkstra_add_wall elsif state . user_input == :greedy_add_wall process_input_greedy_add_wall elsif state . user_input == :a_star_add_wall process_input_a_star_add_wall end end
Processes click and drag based on what the user is currently dragging
Processes click and drag based on what the user is currently dragging