I need to make a Loop from 0 to 8 that generates a random number each time but never repeats.
I can only use arrays, and I cannot resize them.
I'll use an example, (this is in no particular language)
I've forgotten how to do this
Technically it's not Mac related, in fact it's for a game (making/modding a map),
But I thought this was the best place to post.
Does anyone know how to do this?
Kind Regards
I can only use arrays, and I cannot resize them.
I'll use an example, (this is in no particular language)
Code:
Integer Array [4] (index 0 - 4 (5 numbers) are set to 0 - 4)
For (i = 0; i<4; i++)
{
Set Random = Random(0,4) //Random Number Between 0 and 4
//The first number selected is 3, the next number should only be able to be 0, 1, 2, 4 (not 3)
}
I've forgotten how to do this
Technically it's not Mac related, in fact it's for a game (making/modding a map),
But I thought this was the best place to post.
Does anyone know how to do this?
Kind Regards