I'm currently trying to create a fixture generating system, but trying to make it as flexible as possible. There are a few conditions: Each team must play each other twice, 4 Teams (1 v 1 x 2) can play each other at a time (as its a once a week league). So far I've done this, however, as only 4 teams can play each other at a time, if the league is greater than 4 one or more teams have to wait till the following week to play their games. However the current way I'm doing it results in (say in a league 5 big) team 1 playing all their games across several weeks before teams 5 even plays one. Basically I need a method of checking which team(s) hasn't played in the first set of 4 and making sure they are selected the following week over the top of the others. Currently I'm using a query that selects all the teams who don't have a date for a game assigned > looping the query once picking the top two teams to play > then another query that selects the same but is not either of the first two, to generate the first 2 fixtures. I know this mustn't make a great deal of sense, however if someone can offer some insight, or even links to tutorials of fixture generation logic in code .. i'd appreciate it.
Well I've decided to select the first fixture at random, the ripple effect that follows that from the other conditional statements seem to make things work out ok. 11 people viewed this thread, apologies for any subsequent headaches from reading the above... think how i feel!
Very good Omission, you are indeed trying and that is where it counts most - keep trying. I believe you'll get it sorted out based on your comments, but I have a little spoke to throw in your wheel...what if each team had to rest for a specified period of time? Could your code accommodate that? Always push your limits daTropics
Instead of calling it a rest, lets say that each team was required to have a by-week after playing their 3 game. (or which ever)