private void IterateGrid(List <IEnumerable <Cell> > allDeadNeighboursOfLiveCell, List <IEnumerable <Cell> > allLiveNeighboursOfLiveCell) { foreach (var cell in LivingCells) { allDeadNeighboursOfLiveCell.Add(Grid.GetDeadNeighboursOfLivingCell(cell)); allLiveNeighboursOfLiveCell.Add(Grid.GetLiveNeighboursOfLivingCell(cell)); } }