SwissTournament

class SwissTournament(val eloCalculator: EloCalculator = EloCalculator()) : Tournament

A swiss style tournament.

Since

1.0.0-beta.8

Author

lunalobos

Constructors

Link copied to clipboard
constructor(eloCalculator: EloCalculator = EloCalculator())

Properties

Link copied to clipboard
open override val activeMatches: List<Match>

Current matches being played.

Link copied to clipboard
open override var completed: Boolean

Whether the tournament has reached its conclusion.

Link copied to clipboard
open override val eloCalculator: EloCalculator

The strategy used for rating adjustments.

Link copied to clipboard
open override val finishedMatches: List<Match>

All concluded matches in the tournament history.

Link copied to clipboard
open override val leaderboard: List<Player>

Standings sorted by score and tie-breakers.

Link copied to clipboard

Total rounds expected for this tournament.

Link copied to clipboard
open override var playersComparator: Comparator<Player>

The strategy used to break ties between players with the same score. Updating this field automatically updates the ranking logic.

Functions

Link copied to clipboard
fun addMatchOf(white: Player, black: Player)

Manually defines a pairing for the first round.

Link copied to clipboard
open override fun addPlayer(player: Player)

Adds a player to the tournament registry.

Link copied to clipboard
open override fun nextRound(): List<Match>

Generates the next round of the tournament. Pairs players with similar scores who haven't played each other yet.

Link copied to clipboard
open override fun removePlayer(player: Player)

Removes a player from the tournament.