More detailed specifications:
There will be new section Tournaments. It will contain
- list of all tournaments (both active and already closed)
- tools to setup a new tournament and edit it's data
- tools for players to join/leave tournament
Referee setups a Tournaments by specifying tournament data:
- Name
- Description
- Game time limit (in hours)
- Prize (which will be split between 3 best players in ratio (15%, 29%, 56%))
- Game modes (that will be applied to all games within the tournament)
- Entry fee (in gold)
Once the Referee has finished editing the data he "publishes" the tournament, which will make it visible for other players and they will be able to join/leave.
Once the Referee decides it is time to start the tournament, he will do so. This will make joining/leaving tournament impossible for players.
When player joins the tournament, he must pay the entry fee. If he leaves, he will get his entry fee back. Player chooses one deck which will be used for every game in the tournament.
After the start, the system declares first elimination round and will make player matchups. Matchups are created this way:
- players are ordered by Level
- list is divided into two groups:
Group A contains top half of the list
Group B contains bottom half of the list
Matchup is created by selecting two random players one from group A and one from group B. If number of players is odd, the player with no matchup will be paired with an AI which will use player's deck.
Games for these matchups are created. These games do not occupy game slots and are visible in the games list (they will be always on top of the games list and will have a tournament icon). Players are notified about new round start by PM.
When a tournament game finishes the tournament participants data will be updated. The loser will get information about the round in which he was eliminated and who did eliminate him. Winner remains in the tournament and awaits next round.
If the game exceeds the game limit specified by the Referee, standard timeout victory procedure is called. In case the game ends in a draw, a new game is created in it's place with new timeout counter. Game replays of tournament games are not accessible until the tournament is finished.
If the last game of current round is finished, the remaining players proceed to next round. The upcoming rounds differ from the initial round because the players are already matched up. Instead the new matchups are created from the winners of old matchups. If there is an odd player, he is handled the same way as previous round.
Once there is only one player remaining, the tournament winner is declared and prizes are sent to their new owners.
Tournament data for reading:
- tounament data (name, description, prize, referee username, start date, finish data, game limit, game modes, entry fee)
- list of all participants and their data (username, current round he is in, eliminated in round, eliminated by)
- matchups for each round with links to the game replays