Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Race

The class for a Race which is a match that includes more than 2 competitors

Hierarchy

  • Race

Index

Constructors

Properties

Methods

Constructors

  • example
    const race = new Race([[player1], [player2, player3], [player4]])
    

    Parameters

    • results: Player[][]

      An ordered array of the race results with the winner in index 0, for all the players who tied on result they go into the same array

    Returns Race

Properties

matches: [Player, Player, number][] = []

Array of the matches and outcomes based on the race results

Methods

  • Turns an array of race results to an array of matches and outcomes

    Parameters

    • results: Player[][]

      An ordered array of the race results with the winner in index 0

    Returns [Player, Player, number][]

    An array of matches and outcomes based on the race results. [Player, Player, matchResult][]