Returns a Boolean value indicating whether the specified player has lost the game.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
An instance of your game’s player class (a custom class implementing the
GKGameprotocol) representing the player evaluating the game model.
YES if this game model represents a losing state for the specified player;
NO if the game has been won or has not yet concluded.
If the game has been won or lost, a strategist evaluating the game model can avoid evaluating further moves in the game and can therefore plan a successful move more efficiently.
For some games, merely identifying winning and losing states of the game model and using a sufficiently large
max value is enough for a strategist to play the game well. However, you can improve both the game performance and the runtime efficiency of move planning by also implementing the
score method to distinguish the relative desirability of non-game-ending states.