samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb
# In code, the cells are represented as 1x1 rectangles
# When drawn, the cells are larger than 1x1 rectangles
# This method is used to scale up cells, and lines
# Objects are scaled up according to the grid.cell_size variable
# This allows for easy customization of the visual scale of the grid
In code, the cells are represented as 1x1 rectangles
When drawn, the cells are larger than 1x1 rectangles
This method is used to scale up cells, and lines
Objects are scaled up according to the grid.cell_size variable
This allows for easy customization of the visual scale of the grid
In code the cells are represented as 1x1 rectangles When drawn the cells are larger than 1x1 rectangles This method is used to scale up cells and lines Objects are scaled up according to the grid . cell_size variable This allows for easy customization of the visual scale of the grid
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
In code, the cells are represented as 1x1 rectangles
When drawn, the cells are larger than 1x1 rectangles
This method is used to scale up cells, and lines
Objects are scaled up according to the grid.cell_size variable
This allows for easy customization of the visual scale of the grid
In code the cells are represented as 1x1 rectangles When drawn the cells are larger than 1x1 rectangles This method is used to scale up cells and lines Objects are scaled up according to the grid . cell_size variable This allows for easy customization of the visual scale of the grid
# 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