Struct rust_sc2::client::RunnerSingle[][src]

pub struct RunnerSingle<'a, B> where
    B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>, 
{ pub computer: Computer, pub realtime: bool, pub save_replay_as: Option<&'a str>, // some fields omitted }

Runner for games vs built-in AI.

Fields

computer: Computer

Computer opponent configuration.

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> RunnerSingle<'a, B> where
    B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>, 
[src]

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

Constructs new single player runner.

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

Launches SC2 client 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 client.

Auto Trait Implementations

impl<'a, B> RefUnwindSafe for RunnerSingle<'a, B> where
    B: RefUnwindSafe

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

impl<'a, B> Sync for RunnerSingle<'a, B> where
    B: Sync

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

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

Blanket Implementations

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

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

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

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

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

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.

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.

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