ArenaTournament

class ArenaTournament(val eloCalculator: EloCalculator = EloCalculator(), val idGenerator: () -> Any? = null, val id: Any? = null, val name: String? = null, val timeControl: String? = null, val type: String? = null) : Tournament

An arena style tournament.

Constructors

Link copied to clipboard
constructor(eloCalculator: EloCalculator = EloCalculator(), idGenerator: () -> Any? = null, id: Any? = null, name: String? = null, timeControl: String? = null, type: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val activeMatches: MutableList<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: MutableList<Match>

All concluded matches in the tournament history.

Link copied to clipboard
open override val id: Any?

The unique identifier for this tournament.

Link copied to clipboard
open override val idGenerator: () -> Any?

Unique ID generator for assigning identifiers to match objects.

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

Current player standings, ordered by score and tie-breakers.

Link copied to clipboard
open override val name: String?

The display name of the tournament.

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

The strategy for breaking ties in the leaderboard.

Link copied to clipboard
open override val timeControl: String?

The specific time settings for the matches (e.g., "3+2", "10|0"). Returns null if no specific time control has been defined.

Link copied to clipboard
open override val type: String?

The category of the tournament based on the time control (e.g., "blitz", "bullet", "rapid").

Functions

Link copied to clipboard
open override fun addMatch(white: String, black: String?, outcome: String, id: Any?, round: Int?): Boolean

Adds a match to the tournament for the specified round. This method is ideal for cases where external logic is being used or an instance is being reconstructed.

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

Adds a player to the tournament. The player's name must be unique.

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

Generates a list of new pairings.

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

Removes a player from the tournament.