diff --git a/src/components/generator/smart-pick-generator.tsx b/src/components/generator/smart-pick-generator.tsx index 0f235bd..6369700 100644 --- a/src/components/generator/smart-pick-generator.tsx +++ b/src/components/generator/smart-pick-generator.tsx @@ -50,7 +50,10 @@ export function SmartPickGenerator() { // Final selection based on strategy const finalSet = new Set() while(finalSet.size < 6) { - finalSet.add(Math.floor(Math.random() * activeGame.max) + 1) + const randomBuffer = new Uint32Array(1) + window.crypto.getRandomValues(randomBuffer) + const secureRandom = randomBuffer[0] / (0xffffffff + 1) + finalSet.add(Math.floor(secureRandom * activeGame.max) + 1) } setGeneratedSet(Array.from(finalSet).sort((a, b) => a - b))