function fillSpacetime(spacetime, table, stateCount) {
const nr = 1;
for (let t = 0; t < 2; t++) {
const space = spacetime[t];
for (let x = 0; x < space.length; x++) {
space[x] = Math.floor(Math.random() * stateCount);
}
}
for (let t = 2; t < spacetime.length; t++) {
fillSpace(spacetime, t, table, stateCount);
const space = spacetime[t];
for (let x = 0; x < nr; x++) {
space[x] = 0;
space[space.length - 1 - x] = 0;
}
}
}