pub struct PlanSearch<'a, R: Sides, O, E> { /* private fields */ }Expand description
A decision of a TurnPlan bot under way: its loop state in a value,
so the work can be split over many calls (frames, later).
Implementations§
Source§impl<R, O, E> PlanSearch<'_, R, O, E>
impl<R, O, E> PlanSearch<'_, R, O, E>
Sourcepub fn advance(&mut self, units: u32) -> Option<R::Command>
pub fn advance(&mut self, units: u32) -> Option<R::Command>
Does at most units units of work (commands applied to copies) and
returns the chosen command once the decision is made, None while
it is working. Once made, it returns the same command again.
§Panics
With a message naming determinize when a copy of the root refuses
one of its candidates: a bug in the game’s
Determinize::determinize.
Auto Trait Implementations§
impl<'a, R, O, E> !UnwindSafe for PlanSearch<'a, R, O, E>
impl<'a, R, O, E> Freeze for PlanSearch<'a, R, O, E>
impl<'a, R, O, E> RefUnwindSafe for PlanSearch<'a, R, O, E>where
R: RefUnwindSafe,
<R as Sides>::Side: RefUnwindSafe,
<R as TurnRules>::Command: RefUnwindSafe,
O: RefUnwindSafe,
E: RefUnwindSafe,
impl<'a, R, O, E> Send for PlanSearch<'a, R, O, E>
impl<'a, R, O, E> Sync for PlanSearch<'a, R, O, E>
impl<'a, R, O, E> Unpin for PlanSearch<'a, R, O, E>
impl<'a, R, O, E> UnsafeUnpin for PlanSearch<'a, R, O, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more