Function offsetCardinals

Returns cells that correspond to the cardinal directions at a specified distance i.e. it projects a line from start cell in all cardinal directions and returns the cells at steps distance.

  • Parameters

    • grid: Grid

      Grid

    • start: Cell

      Start poiint

    • steps: number

      Distance

    • bounds: BoundsLogic = ...

      Logic for if bounds of grid are exceeded

    Returns Neighbours

    Cells corresponding to cardinals