I'll start by saying that I think this topic is complex and probably is not an easy answer. If it is easy, then everyone will be doing it. Being told ...
I have been asked to create an application to manage a sports league. It is easy to understand most of the concepts except this concept: how to prepare the time of the game, where there is no overlap (the team plays 2 teams at a time), where one team plays its teams twice in one division Once teams play with other divisions, and ensure that there is no hole in the schedule (each team plays every week)
Now using the Rosetta Stone Spreadsheet Process is done manually, which I have created purpose, but it only works for the number of teams it was designed. I have 30 teams, 24 teams and 28 teams. Rather than constantly improving my translation table, I want to codify that argument and instead improve the process.
Thoughts?
A beautiful straightforward system used for example is the chess tournament named Secrets-Robin.
The idea is to divide players into two edges of a table, one of the players has been named as "hub" (for the desire of a better word). The players have to face the tournament against each other against each other. After all of the first round, but the chair on the hub has changed the order forward and white / black (home / away in the game). The entire round-robin competition ends when the players sit at their native place. If you want you have to do it twice to play it twice.
With the details of the implementation.
In my special case, I will try to round round robin, including all the teams. Then you do once for each division and to ensure that the teams play each other at home once in a division and once goes away, check with the round robin about how the team Played from
Also below, that is, you will play in all inter-Division matches before the tournament ends (because in the last N-1 matches against the number of teams in the in-division team [N = division] Are). If this is a problem you can just swap the match around a while.
I have actually written a simple Python script which does not take many lines of code and produces very good results. This will prepare a program where each team plays twice in its division in each division and once against the teams in the other divisions. There is no inquiry to make sure that the team meets each other twice in such a way that the same team is at home, however this code should give a good idea about making your own scheduling code.
#! Div3 = ["Cubs", "Kittens", "Puppies", "Puppies", "Piglets", " , "Calc"] def make_schedule (list): create a schedule for the teams in the "" "list and return it" "s = [] If LAN (list)% 2 == 1: list = list + [" BYE " ] Category (lane) (list) - 1): middle = lane (list) / 2 l1 = list [middle: l2 = list] [middle:] l2.reverse () # I% 2 == 1): s = s + [zip (l1, l2)] and: s = s + [zip (l2, l1)] list.insert (1, list.pop ()) returns s def main (): Create_schedule (div1) For Round: Round Match: Print Match [0] + "Match + Squadule (Divi 2) Print For Round [1] Print: To Match In Round: Print Match [0] +" - "Match To Match_checule (Div 3) for the goal: match for match [1] Print: [0] + "+" + match [1] In order to make the round to create a print (div1 + div2 + div3) : Round to match: Print match [0] + "[+] Print, if __name__ ==" __main__ ": main ()
Comments
Post a Comment