Trait Record

Source
pub trait Record<M: Move, const P: usize> {
    // Required methods
    fn plies(&self) -> Plies<'_, M, P>;
    fn summary(&self) -> Summary<P>;

    // Provided methods
    fn to_transcript(&self) -> Transcript<M, P> { ... }
    fn played_moves_by_chance(&self) -> PlayedMoves<'_, M>  { ... }
    fn played_moves_by_player(
        &self,
        player: PlayerIndex<P>,
    ) -> PlayedMoves<'_, M>  { ... }
    fn played_moves_per_player(&self) -> PerPlayer<PlayedMoves<'_, M>, P> { ... }
}
Expand description

A record of moves played during a game.

The canonical implementations of this trait are:

Required Methods§

Source

fn plies(&self) -> Plies<'_, M, P>

An iterator over the played moves in this record.

A ply typically refers only to a move played in a sequential game. For records of simultaneous games this iterator will return the move played by each player in order of their player index.

Source

fn summary(&self) -> Summary<P>

A summary of the number of moves in this record.

Provided Methods§

Source

fn to_transcript(&self) -> Transcript<M, P>

Get the moves played in the form of a transcript.

Source

fn played_moves_by_chance(&self) -> PlayedMoves<'_, M>

An iterator over all moves by chance.

Source

fn played_moves_by_player(&self, player: PlayerIndex<P>) -> PlayedMoves<'_, M>

An iterator over all moves by a particular player.

Source

fn played_moves_per_player(&self) -> PerPlayer<PlayedMoves<'_, M>, P>

Iterators over the moves by each player.

Implementors§

Source§

impl<M: Move, U: Utility, O: Outcome<M, U, P>, const P: usize> Record<M, P> for History<M, U, O, P>

Source§

impl<M: Move, const P: usize> Record<M, P> for Profile<M, P>

Source§

impl<M: Move, const P: usize> Record<M, P> for Transcript<M, P>