pub struct DisjointImpartialNormalGame<L: Game + NormalImpartial, R: Game + NormalImpartial> { /* private fields */ }
Expand description
Represents the disjoint sum of two impartial normal combinatorial games.
Since Game
isn’t object safe, we use dyn Any
internally with downcast safety.
We restrict games to being normal impartial to force implementation of the marker trait.
Trait Implementations§
Source§impl<L: Clone + Game + NormalImpartial, R: Clone + Game + NormalImpartial> Clone for DisjointImpartialNormalGame<L, R>
impl<L: Clone + Game + NormalImpartial, R: Clone + Game + NormalImpartial> Clone for DisjointImpartialNormalGame<L, R>
Source§fn clone(&self) -> DisjointImpartialNormalGame<L, R>
fn clone(&self) -> DisjointImpartialNormalGame<L, R>
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 moreSource§impl<L: Game + Debug + NormalImpartial + 'static, R: Game + Debug + NormalImpartial + 'static> Game for DisjointImpartialNormalGame<L, R>
impl<L: Game + Debug + NormalImpartial + 'static, R: Game + Debug + NormalImpartial + 'static> Game for DisjointImpartialNormalGame<L, R>
Source§type Move = DisjointMove<L, R>
type Move = DisjointMove<L, R>
The type of move this game uses.
Source§type Iter<'a> = Interleave<Map<<L as Game>::Iter<'a>, Box<dyn Fn(<L as Game>::Move) -> DisjointMove<L, R>>>, Map<<R as Game>::Iter<'a>, Box<dyn Fn(<R as Game>::Move) -> DisjointMove<L, R>>>>
where
L: 'a,
R: 'a,
L::Move: 'a,
R::Move: 'a
type Iter<'a> = Interleave<Map<<L as Game>::Iter<'a>, Box<dyn Fn(<L as Game>::Move) -> DisjointMove<L, R>>>, Map<<R as Game>::Iter<'a>, Box<dyn Fn(<R as Game>::Move) -> DisjointMove<L, R>>>> where L: 'a, R: 'a, L::Move: 'a, R::Move: 'a
The iterator type for possible moves.
type Player = ImpartialPlayer
type MoveError = DisjointMoveError<L, R>
Source§fn move_count(&self) -> usize
fn move_count(&self) -> usize
Returns the amount of moves that have been played
Source§fn possible_moves(&self) -> Self::Iter<'_>
fn possible_moves(&self) -> Self::Iter<'_>
Returns an iterator of all possible moves. Read more
Source§fn state(&self) -> GameState<Self::Player>
fn state(&self) -> GameState<Self::Player>
Returns the current state of the game.
Used for verifying initialization and is commonly called. Read more
Source§impl<L: Game + Debug + NormalImpartial + 'static, R: Game + Debug + NormalImpartial + 'static> Normal for DisjointImpartialNormalGame<L, R>
impl<L: Game + Debug + NormalImpartial + 'static, R: Game + Debug + NormalImpartial + 'static> Normal for DisjointImpartialNormalGame<L, R>
Source§impl<L: Game + Debug + NormalImpartial + 'static, R: Game + Debug + NormalImpartial + 'static> NormalImpartial for DisjointImpartialNormalGame<L, R>
impl<L: Game + Debug + NormalImpartial + 'static, R: Game + Debug + NormalImpartial + 'static> NormalImpartial for DisjointImpartialNormalGame<L, R>
Auto Trait Implementations§
impl<L, R> Freeze for DisjointImpartialNormalGame<L, R>
impl<L, R> RefUnwindSafe for DisjointImpartialNormalGame<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for DisjointImpartialNormalGame<L, R>
impl<L, R> Sync for DisjointImpartialNormalGame<L, R>
impl<L, R> Unpin for DisjointImpartialNormalGame<L, R>
impl<L, R> UnwindSafe for DisjointImpartialNormalGame<L, R>where
L: UnwindSafe,
R: 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