samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
# Cell Size is used when rendering to allow the grid to be scaled up or down
# Cells in the frontier array and visited hash and walls hash are stored as x & y
# Scaling up cells and lines when rendering allows omitting of width and height
Cell Size is used when rendering to allow the grid to be scaled up or down
Cells in the frontier array and visited hash and walls hash are stored as x & y
Scaling up cells and lines when rendering allows omitting of width and height
Cell Size is used when rendering to allow the grid to be scaled up or down Cells in the frontier array and visited hash and walls hash are stored as x & y Scaling up cells and lines when rendering allows omitting of width and height
def scale_up(cell)
    cell = cell.clone
    if cell.size == 2
      cell << 1
      cell << 1
    end
    cell.map! { |value| value * grid.cell_size }
    cell
  end
def scale_up ( cell ) cell = cell . clone if cell . size == 2 cell << 1 cell << 1 end cell . map! { | value | value * grid . cell_size } cell end
Cell Size is used when rendering to allow the grid to be scaled up or down
Cells in the frontier array and visited hash and walls hash are stored as x & y
Scaling up cells and lines when rendering allows omitting of width and height
Cell Size is used when rendering to allow the grid to be scaled up or down Cells in the frontier array and visited hash and walls hash are stored as x & y Scaling up cells and lines when rendering allows omitting of width and height
# Prevents the original value of cell from being edited # If cell is just an x and y coordinate # Add a width and height of 1 # Scale all the values up # Returns the scaled up cell
cell