Score

Represents a score in a tournament. This class uses an internal integer value to represent scores in increments of 0.5. For example, a value of 1 represents a score of 0.5, and 2 represents 1.0.

Since

1.0.0-beta.8

Author

lunalobos

Properties

Link copied to clipboard
val value: Int

The internal raw integer representation of the score.

Functions

Link copied to clipboard
fun addScore(other: Score): Score

Combines this score with another and returns a new Score.

Link copied to clipboard
open operator override fun compareTo(other: Score): Int
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

Converts the internal representation to a Double.

Link copied to clipboard
open override fun toString(): String

Returns the human-readable string representation of the score. Whole numbers are returned as integers (e.g., "1"), while half-points include the ".5" suffix (e.g., "1.5").