RBWCM-SDK Documentation - v1.1.0
    Preparing search index...

    Class GameEntity

    Represents a competitive match (Game) within the system. Provides helper methods to score, cancel, or undo the score of the game directly.

    Index

    Constructors

    Properties

    cancelReason: string | null
    coralId: string | null
    endedAt: Date | null
    id: number
    mapSelection: MapSelection
    pickMode: PickMode
    pickOrder: number[]
    playedAt: Date
    playersPerTeam: number
    state: GameState
    teams: GameTeam[]
    teamsCount: number
    type: QueueType

    Methods

    • Cancels this game, reverting any pending state without affecting ELO.

      Parameters

      • reason: string = 'Game cancelled by admin'

        The reason for cancellation.

      Returns Promise<{ message: string }>

      A promise resolving to a success message.

    • Submits the final score and player statistics for this game. This will update ELO ratings and mark the game as FINISHED.

      Parameters

      • dto: ScoreGameDto

        The payload containing the winning team index and player stats.

      Returns Promise<{ message: string }>

      A promise resolving to a success message.