public override CellState ApplyRule(LifeLikeCell cell) { IList <ICell> neighbors = cell.GetNeighbors(); int aliveNeighborsCount = getAliveCellsCount(neighbors); if (cell.IsAlive() && LivingNeighborsRequirements.Contains(aliveNeighborsCount)) { return(cell.GetState()); } else { return(null); } }
public abstract CellState ApplyRule(LifeLikeCell cell);