Player

class Player(val name: String, val initialElo: Int) : Comparable<Player>

Represents a participant in a tournament, tracking their score, opponents, and eligibility.

Since

1.0.0-beta.8

Author

lunalobos

Constructors

Link copied to clipboard
constructor(name: String, initialElo: Int)

Properties

Link copied to clipboard

Whether the player still active in the tournament.

Link copied to clipboard

Set of players already faced.

Link copied to clipboard

The games with black pieces counter.

Link copied to clipboard

The current elo.

Link copied to clipboard

The Elo rating at the start of the tournament.

Link copied to clipboard

List of matches played by this participant.

Link copied to clipboard

The player's name.

Link copied to clipboard

Historical record of scores per round.

Link copied to clipboard

The score for the tournament.

Functions

Link copied to clipboard

Records the current total score into the roundScores history.

Link copied to clipboard

Increments the count of games played with black pieces.

Link copied to clipboard
open operator override fun compareTo(other: Player): Int

Compares two players to determine tournament standing. Higher scores come first. If scores are equal, the player with the lower blackScore (fewer games as black) is prioritized.

Link copied to clipboard

Disqualify the player from the tournament.

Link copied to clipboard
fun enable()

Enable the player.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String