msaz87 Posted June 28, 2010 Share Posted June 28, 2010 Hey all, I'm looking at writing a script to produce a schedule for a flag football league -- but there are some factors I was hoping I could get help with. I don't want to come across like I'm asking someone to write the script for me -- but just point me in the right direction of something that be of use or offer up a suggestion. So here are the details: - Each league is broken up into X divisions, each with X teams that will play each other over X number of games during X number of dates. Each date has X number of time slots and X number of fields... so for one week, there might be game times at 6:15, 7:00 and 7:45 and games on Field 1, Field 2 and Field 3 for each - The script would randomly place teams in these slots against a team in their division for each game and then just repeat the order if need be So far to this point it's easy enough and something I've already done... but this is what complicates things and I was looking for some guidance on: - Teams might have requests they make... like Team A can't play games earlier than 7 or Team B can't play later than 9 Working in a conditional statement like that is something that throws a wrench into the whole schematic I mapped out in my head... Any help or guidance is really appreciated -- thanks a bunch! Quote Link to comment Share on other sites More sharing options...
ninedoors Posted June 28, 2010 Share Posted June 28, 2010 If you post your code that you have so far someone might be able to help you add those conditions in. Do you have any code yet? Quote Link to comment Share on other sites More sharing options...
msaz87 Posted June 28, 2010 Author Share Posted June 28, 2010 At the moment I don't have any code for this auto-scheduler... the previous one I wrote was basically a by-hand scheduler. You inputted certain variables, date, number of fields, number of times, etc. and it produced the table structure you filled out -- but this new one takes that a step further by randomly assigning those matchups and doing it for every game over the duration of the league. I know that makes it difficult to provide assistance, but generally I try to work out the concept in my head first before I start coding anything and that's where I'm hitting the block -- not even being able to visualize how I might handle the conditions. I'm going to start to write some things out and see if I can't make a little progress and will post it when I can -- but in the meantime if there's any advice, I'd appreciate it. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.