@echecs/elo - v2.2.1
    Preparing search index...

    Function update

    • Updates the Elo ratings of two players based on the result of their game.

      Parameters

      • a: number | PlayerOptions

        The current rating of player A, or a PlayerOptions object.

      • b: number | PlayerOptions

        The current rating of player B, or a PlayerOptions object.

      • resultOrOptions: Result | GameOptions

        The result of the game (0 for loss, 0.5 for draw, 1 for win) or a GameOptions object containing the result and game type.

      Returns [ratingA: number, ratingB: number]

      A tuple of the updated ratings for both players.