The players currently in the game.
Required.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Gameplay
Kit
Declaration
var players: [GKGame Model Player]? { get }
Discussion
This array should contain instances of your player class (a custom class implementing the GKGame
protocol) representing the players in the game. When you use the GKMinmax
class to find an optimal move for a specific player, GameplayKit uses this array to rate the moves of that player’s opponent(s).