示例#1
0
        private void BringToLife(GameCell cell)
        {
            int aliveNeighbors = HowManyAliveNeighbors(cell);

            if (aliveNeighbors == 3)
            {
                cell.MarkForLife();
            }
            else
            {
                cell.MarkForDeath();
            }
        }
示例#2
0
        private void Executioner(GameCell cell)
        {
            int aliveNeighbors = HowManyAliveNeighbors(cell);

            if (aliveNeighbors > 3 || aliveNeighbors < 2)
            {
                cell.MarkForDeath();
            }
            else
            {
                cell.MarkForLife();
            }
        }