Spectacular Cellular Automata
    Preparing search index...

    Function editorUndo

    • Undo last editor action.

      Returns void

      export function editorUndo() {
      if (drawingStroke) return;

      /** @type {ChangeT} */
      const change = reactiveState.historyStack.pop();
      change.setCellsDead.forEach((i) => (sharedState.cells[i] = 1));
      change.setCellsAlive.forEach((i) => (sharedState.cells[i] = 0));
      reactiveState.redoStack.push(change);
      }