From c3a43fd2ed544e9741043cd11f5a3d3224a62fc1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 31 May 2025 15:14:24 -0700 Subject: [PATCH] [board, moves] Update some comments and docs --- board/src/board.rs | 5 +++-- board/src/piece_sets.rs | 1 + moves/src/moves.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/board/src/board.rs b/board/src/board.rs index 4746e95..9b02af6 100644 --- a/board/src/board.rs +++ b/board/src/board.rs @@ -71,8 +71,9 @@ impl Board { /// /// ## Errors /// - /// When is called with [`PlacePieceStrategy::PreserveExisting`], and a piece already exists on - /// `square`, this method returns a [`PlacePieceError::ExistingPiece`] error. + /// When is called with [`PlacePieceStrategy::PreserveExisting`], and a + /// piece already exists on `square`, this method returns a + /// [`PlacePieceError::ExistingPiece`] error. /// pub fn place_piece( &mut self, diff --git a/board/src/piece_sets.rs b/board/src/piece_sets.rs index 98a9d40..8db0c93 100644 --- a/board/src/piece_sets.rs +++ b/board/src/piece_sets.rs @@ -90,6 +90,7 @@ impl PieceSet { self.mailbox.get(square) } + // TODO: Rename this. Maybe get_all() is better? pub(crate) fn find_pieces(&self, piece: Piece) -> BitBoard { let color_occupancy = self.color_occupancy[piece.color as usize]; let shape_occupancy = self.shape_occupancy[piece.shape as usize]; diff --git a/moves/src/moves.rs b/moves/src/moves.rs index 59ac237..94ef0ad 100644 --- a/moves/src/moves.rs +++ b/moves/src/moves.rs @@ -52,7 +52,7 @@ macro_rules! ply { }; } -/// A single player's move. In game theory parlance, this is a "ply". +/// A single player's move. In game theory parlance, this is a "ply." /// /// ## TODO ///