Recommend this page to a friend! |
Classes of Tomáš Vojík | PHP Tournament Bracket Generator | wiki/examples/preset.md | Download |
|
DownloadIntroductionYou also have an ability to use predefined tournament templates. Templates are predefined classes, that make it easier to create commonly used tournament brackets with any number of Teams. All templates are used in a similar way - see the list of templates. Creating a tournamentIn this example, we will be looking at creating a single elimination bracket. Start with creating a new SingleElimination class.
You can also set play time, time between games and time between rounds to later calculate a timetable of the whole tournament
Adding teamsNow, you can add Teams to your tournament. We will add just a few, but you can populate your tournament with your own teams.
Now, we generate all the games using a generate() method.
Generating resultsAt last, you set results to all your Games one by one with your own scores.
Or you simulate all the Rounds.
Or you can simulate a whole Tournament at once.
Getting final resultsFinally, you can get all the Teams ordered by their results.
|