tiebreakerComparatorOf

Factory function that creates a composite Comparator for Players based on a prioritized list of tie-breaker criteria. The function chains the comparators in the order provided. If the first tie-breaker results in a tie, it moves to the second, and so on.

Supported Tie-breaker Names:

NameLogicDescription
"blackGames"blackScorePrioritizes players who played more games with Black pieces.
"buchholz"Median-BuchholzSum of opponents' scores, excluding the highest and lowest (outliers).
"sonnebornBerger"Quality of WinSum of defeated opponents' scores + 50% of drawn opponents' scores.
"progressive"Cumulative SumSum of the player's total score after each individual round.
"fidePerformance"FIDE RpPerformance Rating based on FIDE's dp table and opponents' average Elo.
"linearPerformance"Linear RpSimplified performance: AvgElo + (Score * 400) - 400.

Return

A Comparator used to rank players beyond their primary match score.

Parameters

names

A variable list of strings matching the names above (case-insensitive).

Throws

if a name is provided that does not match the list above.

Samples