Function neighbourList

Gets a list of neighbours for cell (using neighbours), filtering results to only those that are valid neighbours (using isNeighbour)

// Get all eight surrounding cells
const n = Grids.neighbourList(grid, cell, Grids.allDirections);

// Get north, east, south, west cells
const n = Grids.neighbourList(grid, cell, Grids.crossDirections);