IGKGameModel Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The current game state. Particularly useful in conjunction with GKMinMaxStrategist.
[Foundation.Protocol(Name="GKGameModel", WrapperType=typeof(GameplayKit.GKGameModelWrapper))]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 11, ObjCRuntime.PlatformArchitecture.Arch64, null)]
public interface IGKGameModel : Foundation.INSCopying, IDisposable
type IGKGameModel = interface
interface INativeObject
interface IDisposable
interface INSCopying
- Attributes
- Implements
Remarks
When GKMinMaxStrategist is used as an AI opponent, it uses T:Gameplay.IGKGameModel objects to describe the game's state and IGKGameModelUpdate objects to describe potential moves. (See the "AI Opponent" section in the remarks at GameplayKit)
Properties
Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from INativeObject) |
Methods
ApplyGameModelUpdate(IGKGameModelUpdate) |
Modifies the internal state of this IGKGameModel according to the move described in |
Copy(NSZone) |
Performs a copy of the underlying Objective-C object. (Inherited from INSCopying) |
GetActivePlayer() |
The current IGKGameModelPlayer. |
GetGameModelUpdates(IGKGameModelPlayer) |
The set of legal moves available to the player who's GetPlayerId(IGKGameModelPlayer) value is the same as that of |
GetPlayers() |
The IGKGameModelPlayer objects involved in the game. |
SetGameModel(IGKGameModel) |
Sets the internal state of the game to |
Extension Methods
GetScore(IGKGameModel, IGKGameModelPlayer) |
Gets the score for the specified |
IsLoss(IGKGameModel, IGKGameModelPlayer) |
Returns a Boolean value that tells whether the |
IsWin(IGKGameModel, IGKGameModelPlayer) |
Returns a Boolean value that tells whether the |
UnapplyGameModelUpdate(IGKGameModel, IGKGameModelUpdate) |
Removes the specified changes from the game's state. |