0

Im trying to create a Fixture list for a soccer tournament where the teams should be created on a exactly position, and I'm having some issues because all my functions end on some point breaking.

the json that I use for the functions is:

{"uuid":"ca059235-a2c0-5119-af46-9cd169af0f13","category":[{"cat":"U7","id":"a00b6bd4-3587-59d6-9e1e-372d5c7f490a","color":"black","time":"60","games":"1","gender":"f","ranked":"1","groups":[{"group": "A", "teams": [{"team":"Team 1", "bye":"false"},{"team":"Team 2", "bye":"false"},{"team":"Team 3", "bye":"false"},{"team":"Team 4", "bye":"false"}]},{"group": "B", "teams": [{"team":"Team 5", "bye":"false"},{"team":"Team 6", "bye":"false"},{"team":"Team 7", "bye":"false"},{"team":"Team 8", "bye":"false"}]},{"group": "C", "teams": [{"team":"Team 9", "bye":"false"},{"team":"Team 10", "bye":"false"},{"team":"Team 11", "bye":"false"},{"team":"Team 12", "bye":"false"}]},{"group": "D", "teams": [{"team":"Team 13", "bye":"false"},{"team":"Team 14", "bye":"false"},{"team":"Team 15", "bye":"false"},{"team":"Team 16", "bye":"false"}]}]}]}

where "games" it's the number of rounds should be played and the teams are extracted from each group

the exact result should be like this:

Round 1: {1:2}{3:4}
Round 2: {1:3}{2:4}
Round 3: {2:3}{1:4}

What it's bugging me it's what happen if there's more than 4 teams or more than 3 rounds? I really don't know too much about soccer so I don't know what type of formula they use to make this type of fixtures, anybody can give me a hand?

ozonostudio
  • 119
  • 2
  • 6
  • 13

0 Answers0