Skip to content

Commit

Permalink
chore: fix some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
raklaptudirm committed Jul 30, 2024
1 parent e6459aa commit 6207d24
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions games/src/ataxx/piece.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ impl FromStr for ColoredPiece {
}

impl fmt::Display for ColoredPiece {
/// Implements displaying the Piece in a human-readable form. [`Piece::Black`]
/// is formatted as `x` and [`Piece::White`] is formatted as `o`.
/// Implements displaying the Piece in a human-readable form.
/// [`ColoredPiece::Black`] is formatted as `x` and [`ColoredPiece::White`]
/// is formatted as `o`.
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
Expand Down
4 changes: 2 additions & 2 deletions games/src/ataxx/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ use super::moves;
/// necessary to manipulate such a snapshot.
#[derive(Copy, Clone)]
pub struct Position {
/// bitboards stores [BitBoard]s for the piece configuration of each [Piece].
/// bitboards stores [BitBoard]s for the piece configuration of each piece.
pub bitboards: [BitBoard; ColoredPiece::N],
/// checksum stores the semi-unique [struct@Hash] of the current Position.
pub checksum: Hash,
/// side_to_move stores the [Piece] whose turn to move it currently is.
/// side_to_move stores the piece whose turn to move it currently is.
pub side_to_move: Color,
pub ply_count: u16,
/// half-move clock stores the number of half-moves since the last irreversible
Expand Down
5 changes: 3 additions & 2 deletions games/src/interface/move.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ pub trait MoveType: FromStr + Display + From<u16> + Into<u16> + Copy {

/// MoveStore is a trait implemented by types which are able to store moves
/// inside themselves and are thus usable in move-generation methods in
/// [Position] like [`Position::generate_moves_into<T>`].
/// [Position](super::PositionType) like
/// [`generate_moves_into<T>`](super::PositionType::generate_moves_into<T>).
pub trait MoveStore<M>: Default {
/// push adds the given Move to the MoveStore.
fn push(&mut self, m: M);

/// len returns the number of [Move]s stored in the MoveStore.
/// len returns the number of [Moves](MoveType) stored in the MoveStore.
fn len(&self) -> usize;

/// is_empty checks if no [Move]s are stored in the MoveStore.
Expand Down

0 comments on commit 6207d24

Please sign in to comment.