1
0
Fork 0
trans.fail_xenotopic.network/pde/jitakami/shuffle.pde

14 lines
231 B
Plaintext
Raw Normal View History

2023-05-02 19:27:54 +02:00
// function to shuffle an array of integers
void shuffle(int[] a)
{
int temp, pick;
for(int i=0; i<a.length; i++)
{
temp = a[i];
pick = (int)random(a.length);
a[i] = a[pick];
a[pick] = temp;
}
}