samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
def process_input
    if state.user_input == :slider
      process_input_slider
    elsif state.user_input == :bfs_star
      process_input_bfs_star
    elsif state.user_input == :heuristic_star
      process_input_heuristic_star
    elsif state.user_input == :bfs_target
      process_input_bfs_target
    elsif state.user_input == :heuristic_target
      process_input_heuristic_target
    elsif state.user_input == :bfs_remove_wall
      process_input_bfs_remove_wall
    elsif state.user_input == :heuristic_remove_wall
      process_input_heuristic_remove_wall
    elsif state.user_input == :bfs_add_wall
      process_input_bfs_add_wall
    elsif state.user_input == :heuristic_add_wall
      process_input_heuristic_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
Processes click and drag based on what the user is currently dragging
def process_input
    if state.user_input == :slider
      process_input_slider
    elsif state.user_input == :bfs_star
      process_input_bfs_star
    elsif state.user_input == :heuristic_star
      process_input_heuristic_star
    elsif state.user_input == :bfs_target
      process_input_bfs_target
    elsif state.user_input == :heuristic_target
      process_input_heuristic_target
    elsif state.user_input == :bfs_remove_wall
      process_input_bfs_remove_wall
    elsif state.user_input == :heuristic_remove_wall
      process_input_heuristic_remove_wall
    elsif state.user_input == :bfs_add_wall
      process_input_bfs_add_wall
    elsif state.user_input == :heuristic_add_wall
      process_input_heuristic_add_wall
    end
  end
def process_input if state . user_input == :slider process_input_slider elsif state . user_input == :bfs_star process_input_bfs_star elsif state . user_input == :heuristic_star process_input_heuristic_star elsif state . user_input == :bfs_target process_input_bfs_target elsif state . user_input == :heuristic_target process_input_heuristic_target elsif state . user_input == :bfs_remove_wall process_input_bfs_remove_wall elsif state . user_input == :heuristic_remove_wall process_input_heuristic_remove_wall elsif state . user_input == :bfs_add_wall process_input_bfs_add_wall elsif state . user_input == :heuristic_add_wall process_input_heuristic_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