tournament

fun tournament(type: String, tiebreakers: JsArray<String> = arrayOf("fidePerformance", "buchholz", "progressive", "sonnebornBerger"), impactFactor: Double = 32.0, rangeFactor: Double = 400.0, logisticBase: Double = 10.0): Tournament

Factory function to create a Tournament instance based on the specified type.

Return

A Tournament instance.

Parameters

type

The tournament format to create. Supported values: "arena", "swiss".

tiebreakers

an array with the tiebreakers names in order. Supported values for each name are: "blackGames", "progressive", "sonnebornBerger", "fidePerformance", "linearPerformance", or "buchholz"

impactFactor

The K-factor that determines how much a single match affects the rating. A higher value leads to faster rating changes. Default is 32.0.

rangeFactor

The scale factor used to determine win probability. In standard Elo (like Chess), this is typically 400.0.

logisticBase

The base of the exponent in the logistic function.

Throws

if the type provided is not recognized.

Samples