samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
# Translates the given cell grid.width + 1 to the right and then scales up
# Used to draw cells for the second grid
# This method does not work for lines,
# so separate methods exist for the grid lines
Translates the given cell grid.width + 1 to the right and then scales up
Used to draw cells for the second grid
This method does not work for lines,
so separate methods exist for the grid lines
Translates the given cell grid . width + 1 to the right and then scales up Used to draw cells for the second grid This method does not work for lines so separate methods exist for the grid lines
def heuristic_scale_up(cell)
    cell = cell.clone
    cell.x += grid.width + 1
    bfs_scale_up(cell)
  end
def heuristic_scale_up ( cell ) cell = cell . clone cell . x += grid . width + 1 bfs_scale_up ( cell ) end
Translates the given cell grid.width + 1 to the right and then scales up
Used to draw cells for the second grid
This method does not work for lines,
so separate methods exist for the grid lines
Translates the given cell grid . width + 1 to the right and then scales up Used to draw cells for the second grid This method does not work for lines so separate methods exist for the grid lines
# Prevents the original value of cell from being edited # Translates the cell to the second grid equivalent # Proceeds as if scaling up for the first grid
cell