Пример #1
0
        public override Cell Tick(Neighbours neighbours)
        {
            var aliveNeighbours = neighbours.CountAlive();

            return(aliveNeighbours < 2 || aliveNeighbours > 3
                ? new DeadCell() as Cell
                : this);
        }
Пример #2
0
 public override Cell Tick(Neighbours neighbours)
 {
     return(neighbours.CountAlive() == 3
         ? new LiveCell() as Cell
         : this);
 }