samples/13_path_finding_algorithms/04_early_exit/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
    state.frontier  = []
    state.visited   = {}
    state.early_exit_visited   = {}
    state.came_from = {}
    state.path      = {}
  end
def reset_search state . frontier = [ ] state . visited = { } state . early_exit_visited = { } state . came_from = { } state . path = { } 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
# Reset_Searchs the search