Struct rust_sc2::client::RunnerMulti[][src]

pub struct RunnerMulti<'a, B> where
    B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>, 
{ pub human_settings: PlayerSettings<'a>, pub realtime: bool, pub save_replay_as: Option<&'a str>, // some fields omitted }
Expand description

Runner for games vs Human.

Fields

human_settings: PlayerSettings<'a>

Configuration of human opponent.

realtime: bool

Play games in real time mode or not.

save_replay_as: Option<&'a str>

Save replay after the game in given path.

Implementations

impl<'a, B> RunnerMulti<'a, B> where
    B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>, 
[src]

pub fn new(
    bot: &'a mut B,
    human_settings: PlayerSettings<'a>,
    map: &str,
    sc2_version: Option<&'a str>
) -> Self
[src]

Constructs new multi player runner.

pub fn launch(&mut self) -> SC2Result<()>[src]

Launches SC2 clients and connects bot to the API.

pub fn run_game(&mut self) -> SC2Result<()>[src]

Runs requested game.

pub fn set_map(&mut self, map: &str)[src]

Changes map to play on.

Panics

Panics if the map doesn’t exist in maps directory.

pub fn close(&mut self)[src]

Manually closes SC2 clients.

Auto Trait Implementations

impl<'a, B> !RefUnwindSafe for RunnerMulti<'a, B>

impl<'a, B> Send for RunnerMulti<'a, B> where
    B: Send

impl<'a, B> !Sync for RunnerMulti<'a, B>

impl<'a, B> Unpin for RunnerMulti<'a, B>

impl<'a, B> !UnwindSafe for RunnerMulti<'a, B>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V