I am trying to generate a round robin tournament schedule for an even number of teams in c sharp.
I was thinking of using an array but I am having a little trouble getting it to work. I want the first team to remain fixed, so I was just thinking of using an int for this team. Then I want the array to rotate, so that the fixed int will pair up with the first element in the array and all of the remaining elements will pair up together like this:
- int Team1 vs array[0]
- array[1] vs array[2]
- array[3] vs array[4]
- array[5] vs array[6]
etc. and then rotate so that Team1 plays against each member of the array and they all play each other as well. Thanks for any help you can provide!