Home>

I am making a 16-mass roulette system with JavaScript and jQuery.
When you press start, 1 to 16 glow randomly, and when you press stop, the color changes.
When you press start again, the squares other than the ones that stopped will glow randomly.
I repeated this 16 times, and the following error occurred while implementing the function to return to the original when reset.

The problem i am having

● By pressing start and stop alternately 16 times, all the squares will not be colored.
It seems that it stopped once and stopped at the colored square.

Corresponding source code





Chapter 12 Assignments






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16








What I tried

When I press stop, block.splice (flash_block_num, 1);should delete one by one from the array.
For some reason, it stops again at the square that stopped.
I've searched a lot, but I don't know what's wrong.

Could you give me a hint?