Spectacular Cellular Automata
    Preparing search index...

    Function generateRandomCells

    • Parameters

      • width: number
      • height: number

      Returns number[][]

      export function generateRandomCells(width, height) {
      return Array.from({ length: height }, () =>
      Array.from({ length: width }, () =>
      Math.random() < reactiveState.randomFillProbability ? 1 : 0,
      ),
      );
      }