update bug on number of scroll

This commit is contained in:
arthur 2025-12-12 10:25:25 +07:00
parent b797765d02
commit 0788e66d42

View File

@ -112,8 +112,13 @@ export function SlotMachine({ winner, isSpinning, onAnimationComplete, onDraw, p
const numbers = [];
const sequence = randomSequences[reelIndex];
// Repeat the randomized sequence NUM_DUPLICATES times, then one final cycle
for (let i = 0; i < NUM_DUPLICATES + 1; i++) {
// For the first reel (only 0-1), we need more repetitions to fill the strip
// For other reels (0-9), use normal repetitions
const repetitions = reelIndex === 0
? (NUM_DUPLICATES + 1) * 5 // First reel: repeat 30 times (2 numbers × 30 = 60 total)
: (NUM_DUPLICATES + 1); // Other reels: repeat 6 times (10 numbers × 6 = 60 total)
for (let i = 0; i < repetitions; i++) {
sequence.forEach(num => numbers.push(num));
}