samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
def process_input_bfs_add_wall
    if bfs_mouse_over_grid?
      unless grid.walls.has_key?(bfs_cell_closest_to_mouse)
        grid.walls[bfs_cell_closest_to_mouse] = true
        recalculate_searches
      end
    end
  end
# Adds a wall in the first grid in the cell the mouse is over
Adds a wall in the first grid in the cell the mouse is over
Adds a wall in the first grid in the cell the mouse is over
def process_input_bfs_add_wall
    if bfs_mouse_over_grid?
      unless grid.walls.has_key?(bfs_cell_closest_to_mouse)
        grid.walls[bfs_cell_closest_to_mouse] = true
        recalculate_searches
      end
    end
  end
def process_input_bfs_add_wall if bfs_mouse_over_grid? unless grid . walls . has_key? ( bfs_cell_closest_to_mouse ) grid . walls [ bfs_cell_closest_to_mouse ] = true recalculate_searches end end end
Adds a wall in the first grid in the cell the mouse is over
Adds a wall in the first grid in the cell the mouse is over