Interface

ITournamentHubController

This interface provides a set of methods for the user to interact with tournaments via a connected tournament hub (ITournamentHubCallbackHandler). After the tournament hub is initialized, the controller implementing this interface is provided to the tournament hub. Use the tournament hub controller to join the user's active match and receive tournament match status updates. When calling JoinTournamentMatch(), a tournament match handler can be provided that creates an interface between the tournament hub and the game room/lobby API.


Property

ActiveMatchFinishDeadlineCountdown

Determine the remaining time until the user's active match has to be finished.

Remarks

The finish deadline can be obtained for any match from the match property Deadline.

ActiveMatchFinishDeadlineCountdown

public abstract virtual TimeSpan ActiveMatchFinishDeadlineCountdown
{
    get;
}

Property

ActiveMatchStartDeadlineCountdown

Determine the remaining time until the user's active match should start.

Remarks

The start deadline can be obtained for any match by calling tournament.GetMatchStartDeadline(TournamentMatch).

ActiveMatchStartDeadlineCountdown

public abstract virtual TimeSpan ActiveMatchStartDeadlineCountdown
{
    get;
}

Property

IsConnectedToGameServerNetwork

Determine if the tournament match handler is connected to game servers.

Remarks

This can be used to inform the UI (e.g., the tournament handler is switching to the preferred tournament server region).

IsConnectedToGameServerNetwork

public abstract virtual bool IsConnectedToGameServerNetwork
{
    get;
}

Property

IsGameSessionInProgress

Determine if a game session is in progress.

IsGameSessionInProgress

public abstract virtual bool IsGameSessionInProgress
{
    get;
}

Property

IsMatchHandlerInitialized

Determine if the tournament match handler is initialized.

Remarks

This is set to true after a successful call to JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler). It is also set back to false after calling LeaveTournamentMatch().

IsMatchHandlerInitialized

public abstract virtual bool IsMatchHandlerInitialized
{
    get;
}

Property

IsTournamentRunning

Determine if the tournament is running (has started).

IsTournamentRunning

public abstract virtual bool IsTournamentRunning
{
    get;
}

Property

IsUserKnockedOut

Determine if the user has been knocked out of the tournament.

IsUserKnockedOut

public abstract virtual bool IsUserKnockedOut
{
    get;
}

Property

NextEventCountdown

Determine the remaining time until the next deciding event for the user. (e.g., remaining time until the tournament starts.)

NextEventCountdown

public abstract virtual TimeSpan NextEventCountdown
{
    get;
}

Property

PartyInvites

Get all party invites the user received for this tournament. This contains also dismissed invites.

Remarks

To refresh user invites (e.g., to get recently received ones) call LoadNotifications() on the backbone client.

PartyInvites

public abstract virtual IEnumerable<TournamentPartyInviteNotification> PartyInvites
{
    get;
}

Property

Status

Get the current tournament hub status.

Status

public abstract virtual TournamentHubStatus Status
{
    get;
}

Property

Tournament

Get the tournament that this controller was initialized for.

Tournament

public abstract virtual Tournament Tournament
{
    get;
}

Method

IsUserConnectedToMatch(long)

Determine if a specific user is connected to the tournament match room/lobby.

Parameters

  • Name
    userId
    Type
    long
    Description

    Backbone user ID.

Returns

True if the user is connected.

Remarks

This can be used to inform the UI (e.g., the tournament user is connected in the room/lobby).

IsUserConnectedToMatch(long)

public abstract virtual bool IsUserConnectedToMatch(long userId)

Method

IsUserReadyForMatch(long)

Determine if a specific user is ready for the tournament match.

Parameters

  • Name
    userId
    Type
    long
    Description

    Backbone user ID.

Returns

True if the user is ready.

Remarks

This can be used to inform the UI (e.g., the user is connected in the room/lobby, is set on the desired room slot, etc.).

IsUserReadyForMatch(long)

public abstract virtual bool IsUserReadyForMatch(long userId)

Method

JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler)

Inform the tournament hub that the user wants to join a specific match and initiate a connection to the game room/lobby. It also requires passing a tournament match callback handler (ITournamentMatchCallbackHandler) that is an interface to the game room/lobby handling API (e.g., set up a private game room with specific parameters).

Parameters

  • Name
    TournamentMatch
    Type
    match
    Description

    Tournament match the user wants to join

  • Name
    ITournamentMatchCallbackHandler
    Type
    tournamentMatchHandler
    Description

    Tournament match handler implementing ITournamentMatchCallbackHandler interfacing the room/lobby handling API.

Remarks

After requesting to join a match, the tournament hub will start receiving tournament match status via the callback OnHubMatchStatusChanged(TournamentHubMatchStatus).

JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler)

public abstract virtual void JoinTournamentMatch(Gimmebreak.Backbone.Tournaments.TournamentMatch match, Gimmebreak.Backbone.Tournaments.ITournamentMatchCallbackHandler tournamentMatchHandler)

Method

LeaveTournamentMatch()

Leave the joined tournament match.

Remarks

After requesting to leave a match, the tournament hub will stop receiving tournament match status via the callback OnHubMatchStatusChanged(TournamentHubMatchStatus). This will also prompt the tournament match handler to leave the joined room/lobby.

LeaveTournamentMatch()

public abstract virtual void LeaveTournamentMatch()

Method

RefreshActiveMatch()

User request to refresh UserActiveMatch data.

RefreshActiveMatch()

public abstract virtual void RefreshActiveMatch()

Method

SetUserReady()

User informs the tournament that they are ready for the next match. This is meant to be used when the tournament hub status is set to TournamentHubStatus.WaitingForUserReadyConfirmation.

Remarks

Almost every time a user finishes a match, the system does not immediately move users to the next round. It also depends on the specific phase format if the user will be given an autolose or moved to the next match when the round finishes. For example, in a bracket setup, winning users are moved forward when the round is finished. In an arena setup, users will be given an autolose for failing to call SetUserReady().

SetUserReady()

public abstract virtual void SetUserReady()