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. This is a facade created to enable exporting the code to JS, though it can also be used directly within the JS modules of any KMP project.

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").