Spectacular Cellular Automata
    Preparing search index...

    Function mayUndo

    • If we are allowed to undo.

      Takes in these arguments instead of checking reactiveState directly so that its reactivity can be determined.

      Parameters

      • historyStackLength: number
      • atStart: boolean

      Returns boolean

      export const mayUndo = (historyStackLength, atStart) =>
      historyStackLength > 0 && atStart;