You also need to add in the constraints of who is home team and who has to bring the beer.
---- Chad Gray <[email protected]> wrote: > > So like on Friday night > Team1 vs. Team2 > Team3 vs.Team4 > Team5 vs.Team6 > Team7 vs. Team8 > Team9 vs.Team10 > > On Saturday > Team1 vs. team3 > Team2 vs.... this is where I choke... :) > > There has to be a way to loop over this and add one or something then when > you hit 11 reset that to 1???? > > See where I am going? > > > > -----Original Message----- > From: Robert Harrison [mailto:[email protected]] > Sent: Tuesday, February 04, 2014 11:06 AM > To: cf-talk > Subject: RE: setting up team games > > > I assume you're using a data base and some sort of random generator program > to match up the teams. If this is the case, just keep a history table of who > has played who, then when you run the random play generator, check the > history and do not allow repeats. > > If you're going to get 10 teams to play each other, it's going to take more > than 10 games to get them to play each other... I think that would take 90 > games... unless not everyone is playing everyone. > > Robert Harrison > Director of Interactive Services > > Austin & Williams > Advertising I Branding I Digital I Direct > 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 > F 631.434.7022 http://www.austin-williams.com > > Blog: http://www.austin-williams.com/blog > Twitter: http://www.twitter.com/austin_williams > > -----Original Message----- > From: Chad Gray [mailto:[email protected]] > Sent: Tuesday, February 04, 2014 11:00 AM > To: cf-talk > Subject: setting up team games > > > I am working on a website to keep track of baseball teams. once section will > be to take like 10 teams and set them up to play each other over 10 games. > > I would like to figure out a way to programmatically to take the 10 teams and > match them up with the other teams over the 10 games so they only play each > other once over the course of the 10 games. > > Make sense? I am sure it is something simple, but I can't get my head > wrapped around it. > > Thanks! > Chad > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357584 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

