Gets a list of neighbours for cell (using neighbours), filtering results to only those that are valid neighbours (using isNeighbour)
cell
// Get all eight surrounding cellsconst n = Grids.neighbourList(grid, cell, Grids.allDirections);// Get north, east, south, west cellsconst n = Grids.neighbourList(grid, cell, Grids.crossDirections); Copy
// Get all eight surrounding cellsconst n = Grids.neighbourList(grid, cell, Grids.allDirections);// Get north, east, south, west cellsconst n = Grids.neighbourList(grid, cell, Grids.crossDirections);
Grid
Cell
Directions
Bounds
Gets a list of neighbours for
cell
(using neighbours), filtering results to only those that are valid neighbours (using isNeighbour)