-
Notifications
You must be signed in to change notification settings - Fork 0
Structure
In general, a Copa tournament can be in one of five unique states at a time:
stateDiagram-v2
direction LR
s0: Kickstart
s1: Registration
s2: Group stage
s3: Bracket
s4: Completed
[*] --> s0
s0 --> s1
s1 --> s2
s2 --> s3
s3 --> s4
s4 --> [*]
A tournament is kickstarted when it is first created, and completes when the organizer posts a tribute to the winning team.
Furthermore, moving between each state requires some pre-conditions to be met. For instance, it makes no sense to move to the group stage if you don't have at least 2 registered participants. This transition process is captured in the flowcharts below. See the pages about the group or bracket stages for more information about them individually.
The tournament is considered to have been kickstarted once the organizer enters their contacts and hits 'create'.
flowchart TB
begin(( ))
--> org[/Organizer name and contacts/]
--> finish((Kickstart))
The tournament is in registration once the organizer sets the dates for the beginning and end of the registration period.
flowchart TB
begin(("Kickstart"))
--> p0["Schedule registration"]
--> End(("Registration"))
Moving to the group stage can be done at any time (even if registration still hasn't ended), as long as there are technically at least 2 participants necessary to a run a tournament.
flowchart TB
id0(("Registration"))
--> q1{Has registration passed?}
q1 --> |Yes| q2{>2 participants?}
q1 --> |No| q3{End registration early?}
q3 --> |Yes| q2
q3 --> |No| id0
q2 --> |Yes| id1((Group stage))
q2 --> |No| id0
Once the groups have been assigned with the fortune wheel, moving to the next stage (bracket) is just a matter of filling out all the round-robin matches' results, so that standings are available.
flowchart TB
begin(("Group stage"))
--> p0[Draw teams into groups]
--> p1[Schedule matches]
--> p2[Update match results] --> p1
p2 --> q1{Have all matches been played?}
q1 --> |Yes| End((Bracket))
q1 --> |No| p1
Note
It's not a precondition for matches to be scheduled in order to procede to the bracket stage. This is because the application doesn't need to care about schedules, as long as all results/scores have been reported to compute team standings/rankings.
Finally, to complete the tournament all play-off matches must be scored, and a winner verified by the organizer, upon which that team will be mentioned in the hall of fame.
flowchart TB
begin((Bracket))
--> p0[Create bracket]
--> p1[Schedule matches]
--> p2[Update match results]
p2 --> q1{Have all matches been played?}
q1 --> |Yes| p3
q1 --> |No| p1
p3[Confirm winner] --> p4((Complete))
Note
In a similar manner to the note above, completing the scheduling of matches is not required to complete the bracket.
Developer: Aleksei Terin, [email protected], +358 452077333