Trait sc2::Player
[−]
[src]
pub trait Player: Sized { type Error: Error + Send + Into<Error>; fn get_player_setup(
self,
game: GameSetup
) -> Box<Future<Item = (Self, PlayerSetup), Error = Self::Error>>; fn on_event(
self,
_e: GameEvent
) -> Box<Future<Item = Self, Error = Self::Error>>
where
Self: 'static, { ... } }
contract for a player soma to obey
Associated Types
Required Methods
fn get_player_setup(
self,
game: GameSetup
) -> Box<Future<Item = (Self, PlayerSetup), Error = Self::Error>>
self,
game: GameSetup
) -> Box<Future<Item = (Self, PlayerSetup), Error = Self::Error>>
Use the game settings to decide on a player setup
Provided Methods
fn on_event(
self,
_e: GameEvent
) -> Box<Future<Item = Self, Error = Self::Error>> where
Self: 'static,
self,
_e: GameEvent
) -> Box<Future<Item = Self, Error = Self::Error>> where
Self: 'static,
Called whenever the agent needs to handle a game event