[board, moves] Update some comments and docs
This commit is contained in:
parent
086f9c5666
commit
c3a43fd2ed
3 changed files with 5 additions and 3 deletions
|
@ -71,8 +71,9 @@ impl Board {
|
||||||
///
|
///
|
||||||
/// ## Errors
|
/// ## Errors
|
||||||
///
|
///
|
||||||
/// When is called with [`PlacePieceStrategy::PreserveExisting`], and a piece already exists on
|
/// When is called with [`PlacePieceStrategy::PreserveExisting`], and a
|
||||||
/// `square`, this method returns a [`PlacePieceError::ExistingPiece`] error.
|
/// piece already exists on `square`, this method returns a
|
||||||
|
/// [`PlacePieceError::ExistingPiece`] error.
|
||||||
///
|
///
|
||||||
pub fn place_piece(
|
pub fn place_piece(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|
|
@ -90,6 +90,7 @@ impl PieceSet {
|
||||||
self.mailbox.get(square)
|
self.mailbox.get(square)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Rename this. Maybe get_all() is better?
|
||||||
pub(crate) fn find_pieces(&self, piece: Piece) -> BitBoard {
|
pub(crate) fn find_pieces(&self, piece: Piece) -> BitBoard {
|
||||||
let color_occupancy = self.color_occupancy[piece.color as usize];
|
let color_occupancy = self.color_occupancy[piece.color as usize];
|
||||||
let shape_occupancy = self.shape_occupancy[piece.shape as usize];
|
let shape_occupancy = self.shape_occupancy[piece.shape as usize];
|
||||||
|
|
|
@ -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
|
/// ## TODO
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue