public void doStep() {
		anz = 0;
		for (int i = 0; i < size; i++) {
			for (int j = 0; j < size; j++) {
				newCells[i][j] = 0;
			}
		}
		for (int i = 0; i < size; i++) {
			for (int j = 0; j < size; j++) {
				switch (calcNeighborsPeriodic(i, j)) {
				case 0:
				case 1:
					newCells[i][j] = 0; // dies
					break;
				case 2:
					if ((newCells[i][j] = (byte) latticeFrame.getValue(i, j)) == 1) {
						anz++;
					}

					break;
				case 3:
					newCells[i][j] = 1; // condition for birth
					anz++;
					break;
				default:
					newCells[i][j] = 0; // dies of overcrowding if >3

				}
			}
		}
		latticeFrame.setAll(newCells);
		
		dichtePlot.append(0, (double) (anz2/(double)(size*size)), (double) (anz/(double)(size*size)));
		anz2 = anz;
	}