Das Programm berechnet endlos immer wieder neue Generationen. Dazu muss es zuerst für alle Weltfelder die neuen Werte berechnen. Danach können diese Werte in die eigentliche Welt "kopiert" werden:

for (y = 1; y < SIZE_Y-1; y++) {
  for (x = 1; x < SIZE_X-1; x++) {
    newCells[y][x] = newCellValue (y, x);
  }
}

for (y = 1; y < SIZE_Y-1; y++) {
  for (x = 1; x < SIZE_X-1; x++) {
    cells[y][x] = newCells[y][x];
    world.setLeaf (x, y, cells[y][x]);
  }

}