I am building a small website for volleyball (personal interest). Appreciate help in algorithm for scheduling the games such that
- It can work for arbitrary number of teams and groups. Round-robin within each group. So if there are 6 teams in a group then there will be a total of 15 games in that particular group.
- A game lasts for 30 mins
- The schedule is evenly distributed i.e. a team is not required to play consecutively
- Each team is playing in approx equally distributed intervals i.e. a team shouldn't play their 1st game at 8 AM and wait until evening for their next 2 games
- We can schedule games starting from 8 AM until 4 PM.
6 teams is just an example. I am looking for a general algorithm that works for arbitrary number of teams, courts and groups.
Regards.