Function setResults

  • Enforces the symmetry between opponents.

    Sets an opponent's result to something, based on the result on the other opponent.

    Parameters

    • stored: MatchResults

      A reference to what will be updated in the storage.

    • match: {
          opponent1?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; });
          opponent2?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; });
          status?: Status;
      }

      Input of the update.

      • Optional opponent1?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; })

        First opponent of the match.

      • Optional opponent2?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; })

        Second opponent of the match.

      • Optional status?: Status

        Status of the match.

    • check: Result

      A result to check in each opponent.

    • change: Result

      A result to set in each other opponent if check is correct.

    • inRoundRobin: boolean

      Indicates whether the match is in a round-robin stage.

    Returns void

Generated using TypeDoc