scoreOf

fun scoreOf(score: String): Score

Parses a string representation of a score into a Score. The input must be a string ending in either ".0" (for whole points) or ".5" (for half points).

Return

A Score initialized with the correct internal value.

Parameters

score

The string to parse (e.g., "1.0", "2.5").

Throws

if the score format is invalid or does not end in .0 or .5.