This first script highlights tournaments setup taken by the Tournament Authority, the Authority has full control over configuration, point and reward distribution.
With the Tournament configured, participants can now enter the tournament
Once all participants have entered, it's time to start the tournament. When the tournament moves into the started state, no more participants can join.
Now that the tournament has started, it's time to create a tournament round. A round is simply a collection of matches in which participants face off against each other.
After the round of matches have been created, it's time to select which participants face each other in each match, this is completely up to the Tournament Authority
~Matches are now played off chain~
Once the matches finish, it's time to tell Tournaments who won!
At this point, a full round of a tournament has been played out off-chain and the results have been written on-chain. Repeat this flow until a tournament winner has been determined. For each round, increment the roundIndex
by 1.
Lets say the final tournament standings have been determined, it's time to wrap this up!