@Override
	public void iterate() {
		CellArray1D buffer = this.buffer();
		for (int i = 0; i < this.length; i++) {
			Cell thisCell = this.getCell(i);
			int neighbors = this.cells().getNeighborhood(i);
				
			if ( (i == 0 || i == length - 1) && this.getRule().ignoreBoundary) {
				if (thisCell.isAlive())
					buffer.reviveCell(i);
				else
					buffer.killCell(i);
				continue;
			}
				
			if ( !thisCell.isAlive() ) {
				
				if ( this.getRule().applyB(neighbors) ){
					buffer.reviveCell(i);
				}
				else{
					buffer.killCell(i);
					}
			} 
			if ( thisCell.isAlive() ) {

				if ( this.getRule().applyS(neighbors) ){
						buffer.reviveCell(i);
				}
				else {
					buffer.killCell(i);
				}
			}
		}
		this.updateCells(buffer);
		this.next();
		
	}