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:
Profile
for simultaneous gamesTranscript
for sequential gamesHistory
for repeated games
Required Methods§
Provided Methods§
Sourcefn to_transcript(&self) -> Transcript<M, P>
fn to_transcript(&self) -> Transcript<M, P>
Get the moves played in the form of a transcript.
Sourcefn played_moves_by_chance(&self) -> PlayedMoves<'_, M> ⓘ
fn played_moves_by_chance(&self) -> PlayedMoves<'_, M> ⓘ
An iterator over all moves by chance.
Sourcefn played_moves_by_player(&self, player: PlayerIndex<P>) -> PlayedMoves<'_, M> ⓘ
fn played_moves_by_player(&self, player: PlayerIndex<P>) -> PlayedMoves<'_, M> ⓘ
An iterator over all moves by a particular player.
Sourcefn played_moves_per_player(&self) -> PerPlayer<PlayedMoves<'_, M>, P>
fn played_moves_per_player(&self) -> PerPlayer<PlayedMoves<'_, M>, P>
Iterators over the moves by each player.