Hello,
I am trying to creat a process where it randomly picks teams of 2 players out of a list of 12 players. I have run this process for more than 30.000 times, and the results are not so random after the first pick. These are the times every player was picked for each position:
The process step by step is as follows:
- Build data table “dtData” with 12 players
- Assign Int32 variable “Index”=new Random().Next(0,dtData.RowCount)
- Assign String variable “Player1”=dtData.Rows(Index)(0).ToString
- Filter data table “dtData” to remove Player 1 from column 0
- Assign Int32 variable “Index2”=new Random().Next(0,dtData.RowCount)
- Assign String variable “Player2”=dtData.Rows(Index2)(0).ToString
- Filter data table “dtData” to remove Player 2 from column 0
- Add data row to a new table called “dtDoubles” with the array {Player1, Player2}
- Flow decision with the condition “dtData.RowCount=0” if true, the process ends, if false it repeats all steps after the second step.
Can you tell me what I am doing wrong?
Thanks in advance.