public interface GKGameModel extends NSCopying
| Modifier and Type | Method and Description |
|---|---|
GKGameModelPlayer |
activePlayer()
The player whose turn it is to perform an update to the game model.
|
void |
applyGameModelUpdate(GKGameModelUpdate gameModelUpdate)
Applies a GKGameModelUpdate to the game model, potentially resulting in a new activePlayer.
|
NSArray<?> |
gameModelUpdatesForPlayer(GKGameModelPlayer player)
Returns an array of all the GKGameModelUpdates (i.e.
|
default boolean |
isLossForPlayer(GKGameModelPlayer player)
Returns YES if the specified player has reached a loss state, NO if otherwise.
|
default boolean |
isWinForPlayer(GKGameModelPlayer player)
Returns YES if the specified player has reached a win state, NO if otherwise.
|
NSArray<?> |
players()
Array of instances of GKGameModelPlayers representing players within this game model.
|
default long |
scoreForPlayer(GKGameModelPlayer player)
Returns the score for the specified player.
|
void |
setGameModel(GKGameModel gameModel)
Sets the data of another game model.
|
default void |
unapplyGameModelUpdate(GKGameModelUpdate gameModelUpdate) |
copyWithZoneGKGameModelPlayer activePlayer()
void applyGameModelUpdate(GKGameModelUpdate gameModelUpdate)
NSArray<?> gameModelUpdatesForPlayer(GKGameModelPlayer player)
default boolean isLossForPlayer(GKGameModelPlayer player)
default boolean isWinForPlayer(GKGameModelPlayer player)
NSArray<?> players()
default long scoreForPlayer(GKGameModelPlayer player)
void setGameModel(GKGameModel gameModel)
default void unapplyGameModelUpdate(GKGameModelUpdate gameModelUpdate)