samples/13_path_finding_algorithms/08_a_star/app/main.rb
# Translates the given cell (grid.width + 1) * 2 to the right and then scales up
# Used to draw cells for the third grid
# This method does not work for lines,
# so separate methods exist for the grid lines
Translates the given cell (grid.width + 1) * 2 to the right and then scales up
Used to draw cells for the third grid
This method does not work for lines,
so separate methods exist for the grid lines
Translates the given cell ( grid . width + 1 ) * 2 to the right and then scales up Used to draw cells for the third grid This method does not work for lines so separate methods exist for the grid lines
def a_star_scale_up(cell)
    cell = cell.clone
    cell.x += grid.width + 1
    cell.x += grid.width + 1
    dijkstra_scale_up(cell)
  end
def a_star_scale_up ( cell ) cell = cell . clone cell . x += grid . width + 1 cell . x += grid . width + 1 dijkstra_scale_up ( cell ) end
Translates the given cell (grid.width + 1) * 2 to the right and then scales up
Used to draw cells for the third grid
This method does not work for lines,
so separate methods exist for the grid lines
Translates the given cell ( grid . width + 1 ) * 2 to the right and then scales up Used to draw cells for the third 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 # Translates the cell to the third grid equivalent # Proceeds as if scaling up for the first grid
cell