gpg:: TurnBasedMatchConfig:: Builder
#include <turn_based_match_config_builder.h>
Builds one or more TurnBasedMatchConfig objects.
Summary
Constructors and Destructors |
|
---|---|
Builder()
|
Public functions |
|
---|---|
AddAllPlayersToInvite(const std::vector< std::string > & player_ids)
|
Builder &
Adds multiple players to the list of players to invite to the match.
|
AddPlayerToInvite(const std::string & player_id)
|
Builder &
Adds a player to the list of players to invite to the match.
|
Create() const
|
Creates a
TurnBasedMatchConfig object. |
PopulateFromPlayerSelectUIResponse(const TurnBasedMultiplayerManager::PlayerSelectUIResponse & response)
|
Builder &
Populates values from a
TurnBasedMultiplayerManager::ShowPlayerSelectUIResponse . |
SetExclusiveBitMask(uint64_t exclusive_bit_mask)
|
Builder &
A bit mask indicating exclusive roles for players.
|
SetMaximumAutomatchingPlayers(uint32_t maximum_automatching_players)
|
Builder &
The maximum number of auto-matched players who can join the match.
|
SetMinimumAutomatchingPlayers(uint32_t minimum_automatching_players)
|
Builder &
The minimum number of auto-matched players who can join the match.
|
SetVariant(uint32_t variant)
|
Builder &
A developer-specific value used to indicate match type or mode.
|
Public functions
AddAllPlayersToInvite
Builder & AddAllPlayersToInvite( const std::vector< std::string > & player_ids )
Adds multiple players to the list of players to invite to the match.
By default, no players are added.
AddPlayerToInvite
Builder & AddPlayerToInvite( const std::string & player_id )
Adds a player to the list of players to invite to the match.
By default, no players are added to the match. The builder cannot create a match until players are added.
Builder
Builder()
PopulateFromPlayerSelectUIResponse
Builder & PopulateFromPlayerSelectUIResponse( const TurnBasedMultiplayerManager::PlayerSelectUIResponse & response )
Populates values from a TurnBasedMultiplayerManager::ShowPlayerSelectUIResponse
.
Note that this does not populate the variant or the exclusive bit mask.
SetExclusiveBitMask
Builder & SetExclusiveBitMask( uint64_t exclusive_bit_mask )
A bit mask indicating exclusive roles for players.
(E.g. For example, if one player is the attacker, the other must be the defender.) Successful auto-matching requires that the logical product (AND) of the bit mask of any pairing players equals zero. Defaults to 0.
SetMaximumAutomatchingPlayers
Builder & SetMaximumAutomatchingPlayers( uint32_t maximum_automatching_players )
The maximum number of auto-matched players who can join the match.
Left unspecified, defaults to a value equal to the minimum number of auto-matching players.
SetMinimumAutomatchingPlayers
Builder & SetMinimumAutomatchingPlayers( uint32_t minimum_automatching_players )
The minimum number of auto-matched players who can join the match.
Defaults to 0 when left unspecified. At least one auto-matching player or player id must be added.
SetVariant
Builder & SetVariant( uint32_t variant )
A developer-specific value used to indicate match type or mode.
Only players using the same variant can auto-match. Defaults to -1 when left unspecified.