random(min, max) returns a different number every time it's called — so your sketch looks different every run. But there's a twist: randomSeed(n) locks the sequence. Same seed → same "random" numbers, every single time. Like a crime scene: seal it with a seed and the evidence never moves while you investigate.
Each arrangement is a different "case". Space opens a new case. Press 1–9 to jump to case number 1–9 directly — the board freezes so you can study it.
random() — a different number every call: 47.3, 12.8, 91.1, … — unpredictable.randomSeed(42) — resets the sequence to always be the same starting point. The numbers are still "random-looking", but always in the same order. It's like shuffling cards: the shuffle looks random, but if you always start with the same riffle technique, you get the same order.push() and pop() save and restore the drawing state — translate and rotate only affect what's drawn between them.
function draw() { background(155, 110, 60); for (let i = 0; i < 22; i++) { let x = random(20, 400); let y = random(25, 260); } randomSeed(seed); // ← is this in the right place?}randomSeed() resets the sequence from that point forward — but by then, all the random numbers have already been generated.
seed = 42 to seed = 99. The evidence moved. Change it back to 42 — the same layout returns. Why? What does the seed actually control?if (kind === 3) drawQuestion(sz). Write drawQuestion(sz) using textSize(sz * 1.5) and text('?', 0, 0). Don't forget to update floor(random(3)) to floor(random(4)).let positions = [] before the loop, then positions.push({x, y}) inside.rect in one corner with the case number printed on it: text('Case #' + seed, 10, 10). Style it like a police case file label.