samples/13_path_finding_algorithms/05_dijkstra/app/main.rb
# Whenever the user edits the grid,
# The search has to be reset_searchd upto the current step
# with the current grid as the initial state of the grid
Whenever the user edits the grid,
The search has to be reset_searchd upto the current step
with the current grid as the initial state of the grid
Whenever the user edits the grid The search has to be reset_searchd upto the current step with the current grid as the initial state of the grid
def reset_search
    breadth_first_search.visited    = {}
    breadth_first_search.frontier   = []
    breadth_first_search.came_from  = {}
    dijkstra_search.frontier    = []
    dijkstra_search.came_from   = {}
    dijkstra_search.cost_so_far = {}
  end
def reset_search breadth_first_search . visited = { } breadth_first_search . frontier = [ ] breadth_first_search . came_from = { } dijkstra_search . frontier = [ ] dijkstra_search . came_from = { } dijkstra_search . cost_so_far = { } end
Whenever the user edits the grid,
The search has to be reset_searchd upto the current step
with the current grid as the initial state of the grid
Whenever the user edits the grid The search has to be reset_searchd upto the current step with the current grid as the initial state of the grid