Available in the Gaming / Industries Circle
quantum | v2 switch to V1  

API-ITournamentHubController

Namespace: Gimmebreak.Backbone.Tournaments

Inheritance: Object → ITournamentHubController

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

public interface ITournamentHubController

Contents

Properties

ActiveMatchFinishDeadlineCountdown

Determine remaining time until users active match has to be finished.

public abstract virtual TimeSpan ActiveMatchFinishDeadlineCountdown
{
    get;
}

Remarks

Finish deadline can be obtained for any match from match property Deadline.

Back To Top
 

ActiveMatchStartDeadlineCountdown

Determine remaining time until users active match should start.

public abstract virtual TimeSpan ActiveMatchStartDeadlineCountdown
{
    get;
}

Remarks

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

Back To Top
 

IsConnectedToGameServerNetwork

Determine if tournament match handler is connected to game servers.

public abstract virtual bool IsConnectedToGameServerNetwork
{
    get;
}

Remarks

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

Back To Top
 

IsGameSessionInProgress

Determine if game session is in progress.

public abstract virtual bool IsGameSessionInProgress
{
    get;
}

Back To Top
 

IsMatchHandlerInitialized

Determine if tournament match handler is initialized.

public abstract virtual bool IsMatchHandlerInitialized
{
    get;
}

Remarks

This is set to true after successful call by JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler). Also set back to false after LeaveTournamentMatch() call.

Back To Top
 

IsTournamentRunning

Determine if tournament is running (has started).

public abstract virtual bool IsTournamentRunning
{
    get;
}

Back To Top
 

IsUserKnockedOut

Determine if user has been knocked out of the tournament.

public abstract virtual bool IsUserKnockedOut
{
    get;
}

Back To Top
 

NextEventCountdown

Determine remaining time until next deciding event for user. (E.g. remaining time until tournament starts.)

public abstract virtual TimeSpan NextEventCountdown
{
    get;
}

Back To Top
 

PartyInvites

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

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

Remarks

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

Back To Top
 

Status

Get current tournament hub status.

public abstract virtual TournamentHubStatus Status
{
    get;
}

Back To Top
 

Tournament

Get tournament that this controller was initialized for.

public abstract virtual Tournament Tournament
{
    get;
}

Back To Top
 

Methods

IsUserConnectedToMatch(long)

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

public abstract virtual bool IsUserConnectedToMatch(long userId)

Parameters

  • userId: Backbone user id.

Returns

True if user is connected.

Remarks

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

Back To Top
 

IsUserReadyForMatch(long)

Determine if specific user is ready for tournament match.

public abstract virtual bool IsUserReadyForMatch(long userId)

Parameters

  • userId: Backbone user id.

Returns

True if user is ready.

Remarks

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

Back To Top
 

JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler)

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

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

Parameters

  • match: Tournament match user wants to join.
  • tournamentMatchHandler: Tournament match handler implementing ITournamentMatchCallbackHandler interfacing room/lobby handling API.

Remarks

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

Back To Top
 

LeaveTournamentMatch()

Leave joined tournament match.

public abstract virtual void LeaveTournamentMatch()

Remarks

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

Back To Top
 

RefreshActiveMatch()

User request to refresh UserActiveMatch data.

public abstract virtual void RefreshActiveMatch()

Back To Top
 

SetUserReady()

User informs tournament that he is ready for next match. This is meant to be used in case when tournament hub status is set to TournamentHubStatus.WaitingForUserReadyConfirmation.

public abstract virtual void SetUserReady()

Remarks

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


To Document Top