Struct sc2::agent::AgentBuilder [−][src]
pub struct AgentBuilder { /* fields omitted */ }
Build an agent.
Methods
impl AgentBuilder
[src]
impl AgentBuilder
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a new AgentBuilder with the default settings.
pub fn race(self, race: Race) -> Self
[src]
pub fn race(self, race: Race) -> Self
Set the race of the player.
pub fn add_observer_client(&self) -> ObserverClient
[src]
pub fn add_observer_client(&self) -> ObserverClient
Add an Observer client to observe the game state.
pub fn add_action_client(&self) -> ActionClient
[src]
pub fn add_action_client(&self) -> ActionClient
Add an Action client to dispatch commands.
pub fn add_debug_client(&self) -> DebugClient
[src]
pub fn add_debug_client(&self) -> DebugClient
Add a Debug client to use debugging tools.
pub fn take_event_stream(&mut self) -> Option<Receiver<(Event, EventAck)>>
[src]
pub fn take_event_stream(&mut self) -> Option<Receiver<(Event, EventAck)>>
Take the stream of game events to listen for.
This should be called only once per builder! Subsequent calls will return None because Streams should not be shared.
The stream item is a tuple containing the event, and a promise to be fulfilled once the user is done with the event.
Auto Trait Implementations
impl !Send for AgentBuilder
impl !Send for AgentBuilder
impl !Sync for AgentBuilder
impl !Sync for AgentBuilder