samples/13_path_finding_algorithms/08_a_star/app/main.rb
# 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_dijkstra_add_wall
    if dijkstra_mouse_over_grid?
      unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse)
        grid.walls[dijkstra_cell_closest_to_mouse] = true
        reset_searches
      end
    end
  end
def process_input_dijkstra_add_wall if dijkstra_mouse_over_grid? unless grid . walls . has_key? ( dijkstra_cell_closest_to_mouse ) grid . walls [ dijkstra_cell_closest_to_mouse ] = true reset_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