Works regardless the number of players or weeks. It also accounts for 'odd' number of players to create 'bye' weeks.
While looking through workflows and testing yours, I found that our outputs are nearly identical even though our initial workflows are very different.
Upon further inspection I found that my workflow works great with an odd number of teams, but falls apart completely(with duplicate matching) when an even number of teams is used. I was able to fix it to work properly with even teams by first identifying if the number of teams is even or odd, then, if even, removing one team, doing the combinations as if there were only (N-1) teams, then instead of filtering out results where Team A = Team B, change Team B to = Team N, and end up with completely unique results. IE. instead of filtering out "Bye" weeks the Bye week gets automatically matched with team N.
This also means odd teams need N weeks to have a "perfect" number of weeks to complete all combinations but even number of teams only need N-1 weeks to complete all combinations!
I've included a reference from the Wikipedia article about round robin tournaments to visually represent what the workflow is doing with Team 10 in a 10 team scenario
Can you tell me how the posted solution is correct? If I run the solution with 5 teams and 15 weeks (which would be the number of weeks required for each team to play each of the other teams exactly three times, I get this:
This output only considers 3 teams (Teams 4 & 5 never play) and only one Team A vs Team B matchup per week.
It should have 50 rows where something like this is repeated 5 times (weeks 1-5; 6-10; 11-15):
How does the solution imitate a round-robin schedule?
It seems as though the wrong version was uploaded as the solution. I will upload a corrected version later, but in the meantime, change the Condition Expression in the Generate Rows tool to:
teams <= tonumber("%Question.teams%")
Currently, it is set to always equal 3 which is why you're seeing those results.