Beispiel #1
0
        public IEnumerable <Cell <State> > Neighbors(Cell <State> cell)
        {
            var neighbors_position = Neighborhood.Neighbors(cell.Position);

            return(neighbors_position
                   .Select(PositionToIndex)
                   .Select(Cells.ElementAt));
        }
 public Cell Apply(Neighborhood neighborhood)
 {
     return(killerNeighborhoods.Contains(neighborhood) ? Cell.Death : Cell.Alive);
 }