Generate round-robin sport schedules with RRSchedule
One of our projects, called Mon Curling, is a web application that helps recreational curling leagues with their schedules, results and standings. One thing that the app was NOT doing was to generate the schedule automatically. Instead, the league manager had to generate his schedule beforehand and enter all the matches manually in our interface.
I realized that most sport leagues were using a round-robin format for their seasons and this is how I had the idea to make a gem out of it.
The gem takes into consideration the number of available “playing surfaces” and multiple game times. Say for example that you want to generate a round-robin schedule for your 19-teams volleyball league where games are played every wednesday. If there are 3 volleyball fields available and that games are played at 7:00 PM and 9:00 PM. This means that 6 games can be played every gameday (3 volleyball fields * 2 game times).
A vs B on Volleyball field “A” will play at 7:00 PM
C vs D on Volleyball field “B” will play at 7:00 PM
E vs F on Volleyball field “C” will play at 7:00 PM
G vs H on Volleyball field “A” will play at 9:00 PM
I vs J on Volleyball field “B” will play at 9:00 PM
K vs L on Volleyball field “C” will play at 9:00 PM
Since the round-robin round can not be completed on a single day, the remaining games in the round will be put on the next gameday and a new round will start right after.
I hope this gem will be useful to some people!