My issue is fairly simple, I think, but I feel that I need some different perspectives, because I cannot seem to translate this algorithm into code.
I need to make a sports team schedule, where n teams (in this case, 10 teams) play in a round robin format. The rules follow basic round-robin formats, where one team can only play one other team at a given time, and all teams must play all other teams once.
I have found that the algorithm is to hold team 1 in the spot, and rotate the rest clockwise. A dummy team can be used to handle odd numbers for n. The issue arises in the "clockwise" part of the algorithm. I have no idea how I can translate the concept of rotate clockwise to my teams. For example, if I have them split it in an array TeamArray, and TeamArray[0] plays TeamArray[10], etc, in week 1, how can I make them move clockwise for week 2?
I'm not looking for a handout answer, but rather for some help to look at this algorithm in a creative way so that I can translate the concept of moving the teams clockwise.
I appreciate all the help and would be glad to answer anything that might be confusing in my initial question. Thanks!