Creating an NBA Season Scheduler in Swift

You can’t have a basketball league without the players, teams and a ten-foot hoop. But, we also need a way to organize all the games being played! Crafting an effective game scheduler is a central concept in any sports league, and we’re going to build one today.

A quick note.

What is an NBA Season Scheduler?

Creating our NBA League

How Our Scheduler Will Work

1. We want each team to play against every other team once.

2. We’re ok with more than one game happening in a single day in our season, but we want a limit of five games a day. Teams also shouldn’t play more than once a day.

3. Some days, like Christmas or New Year’s, that occur during our season shouldn’t have any games scheduled.

Progressing Through Our Season

Results of Using Our Scheduler

Concluding Thoughts

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store