This function is suppose to randomly chose 2 out of 16 dice, swap their positions, and then chose what side of the dice is facing up. The problem is, when I run the function (I loop it 250 times). It only changes a few dice and the board looks close to the original. I'm not sure if I'm doing something wrong.
void Shake(int Dice[], int Side[])
{
int Temp1, Temp2;
srand(unsigned(time(NULL)));
Temp1 = Dice[(rand()%16)];
Temp2 = Dice[(rand()%16)];
while (Temp1 == Temp2)
{
Temp2 = Dice[(rand()%16)];
}
Dice[Temp1] = Temp2;
Dice[Temp2] = Temp1;
Side[Temp1] = (rand()%6);
Side[Temp2] = (rand()%6);
}