[−][src]Trait rubot::IntoRunCondition
Converts a type into a RunCondition
used by Bot::select
.
It is recommended to mostly use Duration
.
Examples
use std::time::Duration; let available_time = Duration::from_secs(2); let game: Game = // ... let mut bot: Bot = // ... assert!(bot.select(&game, available_time).is_some())
Implementations
Duration
:select
runs for the specified durationToCompletion
:select
runs until it found the perfect actionDepth
:select
analyses up the to given depth and returns to best action at that depthInstant
:select
runs until the givenInstant
is in the pastLogger
: takes another run condition and stores information about the last call toselect
Associated Types
type RunCondition: RunCondition
Required methods
fn into_run_condition(self) -> Self::RunCondition
consumes self
and returns a RunCondition
.
Implementations on Foreign Types
impl IntoRunCondition for Duration
[src]
Creates a RunCondition
which returns true
until this Duration
has passed.
type RunCondition = Instant
fn into_run_condition(self) -> Instant
[src]
Implementors
impl IntoRunCondition for Steps
[src]
type RunCondition = InnerSteps
fn into_run_condition(self) -> InnerSteps
[src]
impl<'a, T: IntoRunCondition> IntoRunCondition for &'a mut Logger<T>
[src]
type RunCondition = InnerLogger<'a, T>
fn into_run_condition(self) -> InnerLogger<'a, T>
[src]
impl<T> IntoRunCondition for T where
T: RunCondition,
[src]
T: RunCondition,