Hey Everyone!
I am messing around with a fantasy football project. Trying to automate the process a little bit.
I need to come up with a function/class that when passed three parameters, (number of divisions in a league / number of teams in the divisions / number of weeks in season), it will spit out a schedule for the different teams to play each other.
Some sample data might be:
Weeks: 15
Divisions: 2
Teams: 4
I have something that kind of works, but I end up having a team playing another team like 9 times out of 15 instead of playing the other teams equally. The whole thing is basically unreliable.
I wonder if there isn't some mathimatical equations that would calculate the different combinations? --> I'm no good at math!
Any help is greatly appreciated!!!