One more question about this code:
How can I asign the elements of 'new' array to the five objects in a loop? I can only add action to each object, one by one.
Thanks again.
Develop games in your browser. Powerful, performant & highly capable.
That works! I set the size of the temp array at start of init function, out the loop.
Thanks very much.
Thanks for your reply. I call init function and then shuffle function but it doesn't work.
Hello.
I can obtain a new shuffled array from another one ('temp') when a botton is pressed. I use a function but it doesn't work when I call it again ('temp' array is empty). What am I doing wrong?
And this is the result in a browser (it works the first time).
Thanks in advance.