Ejemplo n.º 1
0
        public override CellState ApplyRule(LifeLikeCell cell)
        {
            IList <ICell> neighbors           = cell.GetNeighbors();
            int           aliveNeighborsCount = getAliveCellsCount(neighbors);

            if (!cell.IsAlive() && LivingNeighborsRequirements.Contains(aliveNeighborsCount))
            {
                return(cell.GetAliveState());
            }

            else
            {
                //return cell.GetState();//CellState.UNRESOLVED;
                return(null);
            }
        }