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 in 1..size_y-2
  for x in 1..size_x-2
    newCells[y][x] = newCellValue(cells, y, x)
  end
end

for y in 1..size_y-2
  for x in 1..size_x-2
    cells[y][x] = newCells[y][x]
    world.setLeaf(x, y, cells[y][x])
  end
end
tools.checkState()