Results 1 to 1 of 1
Thread: Intervals of Days and Weeks
- 12-14-2011, 11:55 PM #1Member
- Join Date
- Dec 2011
- Rep Power
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?
- By ajimda in forum New To JavaReplies: 2Last Post: 10-28-2011, 05:46 PM
- By pink123 in forum New To JavaReplies: 6Last Post: 07-07-2011, 07:41 PM
- By deeps in forum Advanced JavaReplies: 0Last Post: 03-30-2010, 07:11 AM
- By mohan404 in forum Advanced JavaReplies: 4Last Post: 04-08-2008, 12:46 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 01-28-2008, 10:06 AM