game-common / pragma.matchmaking / Matchable /

Matchable #

abstract class Matchable(parties: List<MatchmakingParty>)

A matchable is a core object for matchmaking tasks that represents a set of parties attempting to start a match.

Constructors #

Matchable

internal fun Matchable(parties: List<MatchmakingParty>)

Functions #

NameSummary

assignPartiesToTeam

fun assignPartiesToTeam(partyIdList: List<UUID>, teamNumber: Int)

Modifies the team assignment of all players within a party for the given party IDs. Ignores unknown party IDs.

assignPlayersToTeam

fun assignPlayersToTeam(playerIdList: List<Fixed128>, teamNumber: Int)

Modifies the team assignment of individual players for the given player IDs. Ignores unknown player IDs.

findParty

fun findParty(partyId: UUID): MatchParty?

Finds a party within this Matchable with a given party ID. Returns null if the party is found.

findPlayer

fun findPlayer(playerId: Fixed128): MatchPlayerInfo?

Finds a player within the parties in this Matchable with a given player ID. Returns null if the player is found.

moveAllPartiesFromPotentialMatch

fun moveAllPartiesFromPotentialMatch(potentialMatch: Matchable)

Moves all parties from the passed in Matchable to this Matchable.

movePartiesFromPotentialMatch

fun movePartiesFromPotentialMatch(potentialMatch: Matchable, partyIds: List<UUID>)

Moves parties for given party IDs from the passed in Matchable to this Matchable. Ignores unknown party IDs.

Inheritors #

Name

PotentialMatch