Instance Property

maxPlayers

The maximum number of players that may join the match.

Declaration

var maxPlayers: Int { get set }

Discussion

The maximum number of players must be equal or greater than the minimum number of players. The maximum number of players may be no more than value returned by the maxPlayersAllowedForMatch(of:) method for the kind of match you plan to create.

See Also

Determining the Number of Players Allowed in the Game

class func maxPlayersAllowedForMatch(of: GKMatchType) -> Int

Returns the maximum number of players allowed in the match request for a given match type.

enum GKMatchType

The kind of match being created.

var minPlayers: Int

The minimum number of players that may join the match.

var defaultNumberOfPlayers: Int

The default number of players for the match.