Esempio n. 1
0
        private void ApplyGameRules(int[] currentCellCoords, List <int[]> neighbourCoords, Grid gridCopy)
        {
            var liveNeighbourCellCount = neighbourCoords.Count(gridCopy.CellIsAliveAtCoords);

            if (gridCopy.CellIsAliveAtCoords(currentCellCoords))
            {
                ApplyRulesForLiveCell(currentCellCoords, liveNeighbourCellCount);
            }
            else
            {
                ApplyRulesForDeadCell(currentCellCoords, liveNeighbourCellCount);
            }
        }