M
mj.clift
Hi All,
I need to be able to choose a random string from an array. That is easy
enough, but I want to restrict the repetition of that string until one
or two other choices have been made. So the following output would be
ok a,b,c,a,d,c or a,c,d,a,d,a but the following would not; a,b,c,c, or
a,b,b,c, etc... I hope that makes sense.
If it helps to understand what I'm trying to do I have the following
python code.
for x in NumberChoices :
while FirstChoice in state[0:2]: #or for x in range(2):
FirstChoice = choice(NextChoice[Choice_List[-1]])
Sequence_List.append(FirstChoice)
state[x%2] = FirstChoice
I've just started with c# so any help would be of great help.
Thank you,
Calvin
I need to be able to choose a random string from an array. That is easy
enough, but I want to restrict the repetition of that string until one
or two other choices have been made. So the following output would be
ok a,b,c,a,d,c or a,c,d,a,d,a but the following would not; a,b,c,c, or
a,b,b,c, etc... I hope that makes sense.
If it helps to understand what I'm trying to do I have the following
python code.
for x in NumberChoices :
while FirstChoice in state[0:2]: #or for x in range(2):
FirstChoice = choice(NextChoice[Choice_List[-1]])
Sequence_List.append(FirstChoice)
state[x%2] = FirstChoice
I've just started with c# so any help would be of great help.
Thank you,
Calvin