API-TournamentPhase
Namespace: Gimmebreak.Backbone.Tournaments
Inheritance: Object → TournamentPhase
Tournament phase defines part of a tournament (number of users entering, number of rounds, format, etc.), tournament can combine many phases to create required flow.
First phase in tournament always starts with Id=1.
Tournament phase has always at least one round.
It also holds logged users information such as played round count, total phase points, phase position, etc.
C#
public class TournamentPhase
Constructors
TournamentPhase()
Creates a tournament phase.
C#
public TournamentPhase()
Properties
GroupCount
Determine how many groups are in current phase.
C#
public int GroupCount
{
get;
set;
}
GroupSize
Determine maximum number of teams/parties per single group.
C#
public int GroupSize
{
get;
}
HasGroups
Determine if there are groups in current phase.
C#
public bool HasGroups
{
get;
}
Id
Phase id (starts with 1).
C#
public int Id
{
get;
set;
}
IsLoserBracketSeeded
Determine if loser bracket is seeded in double elimination bracket phase.
C#
public bool IsLoserBracketSeeded
{
get;
set;
}
IsSkipAllowed
Determine if phase is allowed to be skipped in case there are less or equal teams in current phase then expected in next phase.
C#
public bool IsSkipAllowed
{
get;
set;
}
MaxLoses
Max loses in this phase (E.g. arena can define that if you lose 3 times you are out).
C#
public int MaxLoses
{
get;
set;
}
MaxPlayers
Max players entering this phase.
C#
public int MaxPlayers
{
get;
set;
}
MaxTeams
Max teams/parties entering this phase.
C#
public int MaxTeams
{
get;
set;
}
MaxTeamsPerMatch
Maximum allowed teams per match.
C#
public int MaxTeamsPerMatch
{
get;
set;
}
MinCheckinsPerTeam
Determine how many players in team needs to checkin in order to be allowed to start a tournament match.
C#
public int MinCheckinsPerTeam
{
get;
set;
}
MinTeamsPerMatch
Minimum required teams per match.
This indicates if match should be played or not.
Only fully checked in teams/parties counts.
C#
public int MinTeamsPerMatch
{
get;
set;
}
Remarks
In certain phase formats if match does not contain MinTeamsPerMatch until start deadline then all checked in parties will get autowin and are moved to the next round.
Rounds
Phase rounds.
Each round can have a different time and win conditions (E.g. each round is best of three, but final round is best of five).
C#
public List<TournamentRound> Rounds
{
get;
set;
}
Scores
Determine all party scores in this phase. It holds summary of points, wins, loses, etc. each party gathered.
List has to be loaded on demand. To populate scores use LoadTournamentPhaseScores() on backbone client.
C#
public List<TournamentScore> Scores
{
get;
set;
}
Type
Phase type (E.g. Arena or Bracket).
C#
public TournamentPhaseType Type
{
get;
set;
}
UserGroupId
Determine user group id in current phase.
C#
public int UserGroupId
{
get;
set;
}
UserIsGroupAssigned
Determine if user group id has been assigned.
In case there are groups in first phase of a tournament users has to check in first.
For a team only party leader will trigger group id assigning process on checkin.
C#
public bool UserIsGroupAssigned
{
get;
}
UserIsParticipating
Determine if user is participating in phase.
It can be false if user has been knocked out in previous phase.
C#
public bool UserIsParticipating
{
get;
set;
}
UserLoses
Number of user loses in current phase.
C#
public int UserLoses
{
get;
set;
}
UserPlayedRoundCount
Count of already finished rounds for user in given phase.
This increases despite if user did or did not really play/participate in previous rounds.
C#
public int UserPlayedRoundCount
{
get;
set;
}
UserPoints
Number of user points in current phase.
This represents total points for match results (not total points scored in game sessions).
C#
public int UserPoints
{
get;
set;
}
UserPositionBottom
Users current bottom position in this phase (E.g.(1-3/8) => 3).
C#
public int UserPositionBottom
{
get;
set;
}
UserPositionTop
Users current top position is this phase (E.g. (1-3/8) => 1).
C#
public int UserPositionTop
{
get;
set;
}
Methods
GetRoundById(int)
Gets phase round by specific id.
C#
public Gimmebreak.Backbone.Tournaments.TournamentRound GetRoundById(int roundId)
Parameters
roundId
: Round id (first round always starts with id=1).
Returns
Tournament round or null if round does not exists.
GetScoreByPartyId(long)
Get phase score record by party id. Note that scores has to be loaded prior using this method otherwise the return value will be NULL. Use LoadTournamentPhaseScores() on backbone client.
C#
public Gimmebreak.Backbone.Tournaments.TournamentScore GetScoreByPartyId(long partyId)
Parameters
partyId
: Party id for which we want score record
Returns
Score record or null if it does not exist (or not loaded)
GetScoreByUserId(long)
Get phase score record by user id. Note that scores has to be loaded prior using this method otherwise the return value will be NULL. Use LoadTournamentPhaseScores() on backbone client.
C#
public Gimmebreak.Backbone.Tournaments.TournamentScore GetScoreByUserId(long userId)
Parameters
userId
: User id for which we want score record
Returns
Score record or null if it does not exist (or not loaded)
Back to top