objc2_gameplay_kit/generated/
GKStrategist.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_protocol!(
9    /// [Apple's documentation](https://developer.apple.com/documentation/gameplaykit/gkstrategist?language=objc)
10    pub unsafe trait GKStrategist: NSObjectProtocol {
11        #[cfg(feature = "GKGameModel")]
12        /// The game model that we wish to select updates for.
13        #[unsafe(method(gameModel))]
14        #[unsafe(method_family = none)]
15        unsafe fn gameModel(&self) -> Option<Retained<ProtocolObject<dyn GKGameModel>>>;
16
17        #[cfg(feature = "GKGameModel")]
18        /// Setter for [`gameModel`][Self::gameModel].
19        #[unsafe(method(setGameModel:))]
20        #[unsafe(method_family = none)]
21        unsafe fn setGameModel(&self, game_model: Option<&ProtocolObject<dyn GKGameModel>>);
22
23        #[cfg(feature = "GKRandomSource")]
24        /// A random source to use when breaking ties between equally-strong moves when calling bestMoveForPlayer
25        /// or when selecting a random move when randomMoveForPlayer is called. If set to nil, bestMoveForPlayer
26        /// and randomMoveForPlayer will simply return the first best move available.
27        #[unsafe(method(randomSource))]
28        #[unsafe(method_family = none)]
29        unsafe fn randomSource(&self) -> Option<Retained<ProtocolObject<dyn GKRandom>>>;
30
31        #[cfg(feature = "GKRandomSource")]
32        /// Setter for [`randomSource`][Self::randomSource].
33        #[unsafe(method(setRandomSource:))]
34        #[unsafe(method_family = none)]
35        unsafe fn setRandomSource(&self, random_source: Option<&ProtocolObject<dyn GKRandom>>);
36
37        #[cfg(feature = "GKGameModel")]
38        #[unsafe(method(bestMoveForActivePlayer))]
39        #[unsafe(method_family = none)]
40        unsafe fn bestMoveForActivePlayer(
41            &self,
42        ) -> Option<Retained<ProtocolObject<dyn GKGameModelUpdate>>>;
43    }
44);