objc2-gameplay-kit 0.3.2

Bindings to the GameplayKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use objc2::__framework_prelude::*;

use crate::*;

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/gameplaykit/gkstrategist?language=objc)
    pub unsafe trait GKStrategist: NSObjectProtocol {
        #[cfg(feature = "GKGameModel")]
        /// The game model that we wish to select updates for.
        #[unsafe(method(gameModel))]
        #[unsafe(method_family = none)]
        unsafe fn gameModel(&self) -> Option<Retained<ProtocolObject<dyn GKGameModel>>>;

        #[cfg(feature = "GKGameModel")]
        /// Setter for [`gameModel`][Self::gameModel].
        #[unsafe(method(setGameModel:))]
        #[unsafe(method_family = none)]
        unsafe fn setGameModel(&self, game_model: Option<&ProtocolObject<dyn GKGameModel>>);

        #[cfg(feature = "GKRandomSource")]
        /// A random source to use when breaking ties between equally-strong moves when calling bestMoveForPlayer
        /// or when selecting a random move when randomMoveForPlayer is called. If set to nil, bestMoveForPlayer
        /// and randomMoveForPlayer will simply return the first best move available.
        #[unsafe(method(randomSource))]
        #[unsafe(method_family = none)]
        unsafe fn randomSource(&self) -> Option<Retained<ProtocolObject<dyn GKRandom>>>;

        #[cfg(feature = "GKRandomSource")]
        /// Setter for [`randomSource`][Self::randomSource].
        #[unsafe(method(setRandomSource:))]
        #[unsafe(method_family = none)]
        unsafe fn setRandomSource(&self, random_source: Option<&ProtocolObject<dyn GKRandom>>);

        #[cfg(feature = "GKGameModel")]
        #[unsafe(method(bestMoveForActivePlayer))]
        #[unsafe(method_family = none)]
        unsafe fn bestMoveForActivePlayer(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn GKGameModelUpdate>>>;
    }
);