pub struct LoopyTracker<S: Eq + Hash, T: Eq + Hash> { /* private fields */ }
Expand description
We handle loopy games with a custom struct, LoopyTracker
, which is a
HashSet of some state T. This is used to keep track of the states that
have been visited, and if a state has been visited, we can handle it appropriately.
LoopyTracker
should be updated at Game::make_move
and checked in Game::state
.
We say T
is the primary type, and S
is some representation of T
without the LoopyTracker
.
Implementations§
Trait Implementations§
Source§impl<S: Clone + Eq + Hash, T: Clone + Eq + Hash> Clone for LoopyTracker<S, T>
impl<S: Clone + Eq + Hash, T: Clone + Eq + Hash> Clone for LoopyTracker<S, T>
Source§fn clone(&self) -> LoopyTracker<S, T>
fn clone(&self) -> LoopyTracker<S, T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<S: Eq + Hash, T: Eq + Hash + Loopy<S>> Eq for LoopyTracker<S, T>
Auto Trait Implementations§
impl<S, T> Freeze for LoopyTracker<S, T>
impl<S, T> RefUnwindSafe for LoopyTracker<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for LoopyTracker<S, T>
impl<S, T> Sync for LoopyTracker<S, T>
impl<S, T> Unpin for LoopyTracker<S, T>
impl<S, T> UnwindSafe for LoopyTracker<S, T>where
S: UnwindSafe,
T: UnwindSafe,
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