- Регистрация
- 25.11.2012
- Сообщения
- 544
- Благодарностей
- 26
- Баллы
- 28
Just a question on randomization.
I have three main (blocks) of actions, for example:
1) like,
2) comment,
3) contact.
After I've logged in, I need to randomize the order of all three main actions, i.e. 2,1,3 or 3,1,2, etc. All actions can only be done once.
I'm unable to come up with a solution with random number that doesn't redo the same action (in a possible infinite loop).
I thought of maybe put the Nos: 1,2,3, in a list >take random No > delete the No in list > go to switch that correspond with main action > finish when list is empty.
Problem is I have many accounts, and need many lists!
I have three main (blocks) of actions, for example:
1) like,
2) comment,
3) contact.
After I've logged in, I need to randomize the order of all three main actions, i.e. 2,1,3 or 3,1,2, etc. All actions can only be done once.
I'm unable to come up with a solution with random number that doesn't redo the same action (in a possible infinite loop).
I thought of maybe put the Nos: 1,2,3, in a list >take random No > delete the No in list > go to switch that correspond with main action > finish when list is empty.
Problem is I have many accounts, and need many lists!