From 5e7c3ad7ed8c287b538de97d4de3a4df87e9a100 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 8 Feb 2026 21:18:55 +0900 Subject: feat(study): use seeded PRNG for deterministic card shuffle order Shuffle order is now fixed within a study day by seeding mulberry32 with the study day boundary timestamp (3:00 AM rollover). Co-Authored-By: Claude Opus 4.6 --- src/client/utils/shuffle.ts | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/client/utils/shuffle.ts (limited to 'src/client/utils/shuffle.ts') diff --git a/src/client/utils/shuffle.ts b/src/client/utils/shuffle.ts deleted file mode 100644 index a2b8fec..0000000 --- a/src/client/utils/shuffle.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Fisher-Yates shuffle algorithm. - * Returns a new shuffled array (does not mutate the original). - */ -export function shuffle(array: T[]): T[] { - const result = [...array]; - for (let i = result.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); - const temp = result[i] as T; - result[i] = result[j] as T; - result[j] = temp; - } - return result; -} -- cgit v1.3-1-g0d28