public static List <Cell> Neighbours(this IEnumerable <Cell> grid, Cell cell) { return(grid.Where(otherCell => cell.IsNextTo(otherCell) && otherCell.SwitchedOn).ToList()); }
public static List<Cell> Neighbours(this IEnumerable<Cell> grid, Cell cell) { return grid.Where(otherCell => cell.IsNextTo(otherCell) && otherCell.SwitchedOn).ToList(); }