Intervals of Days and Weeks
I have a problem to solve where I have to make schedules for when members of a hockey team practice during a 20 day period. Not all players will necessary play together at the same time in order to accommodate for the player's lifestyles. All the players are qualified to play all positions. The team only practices during weekdays.
The team members can only play one game per day. Each player can play up to 3 consecutive games a week (a week is the normal 7 days here), and up to 4 games a week. Each player can play up to a maximum of 15 games per 20 game days. These time restrictions include any holidays during the weekdays, but not weekends.
A week includes the weekends, and the 20 game day restriction doesn't. How would I "skip" over the weekends?
Wouldn't my program have to go through the 20 days day-by-day?
I was thinking about using counters for the games played in on a game day, week (7 days), and 20 playble days. For determining if they're consecutive games or not, I will use boolean variables.
If I count through the days like this however, I'd have to continuously stop for the weekends. If I just increase my counters by 2 days to skip over Sunday and Saturday, how would I distinguish between the weekends and game days?