[board] Rename BitBoard::has_piece_at → is_set
This commit is contained in:
parent
98fce9acde
commit
81d544f0d5
2 changed files with 7 additions and 7 deletions
|
@ -137,7 +137,7 @@ impl Position {
|
|||
pub fn place_piece(&mut self, piece: Piece, square: Square) -> Result<(), PiecePlacementError> {
|
||||
let type_bb = self.bitboard_for_piece_mut(piece);
|
||||
|
||||
if type_bb.has_piece_at(square) {
|
||||
if type_bb.is_set(square) {
|
||||
return Err(PiecePlacementError::ExistsOnSquare);
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ impl Position {
|
|||
for shape in Shape::iter() {
|
||||
let piece = Piece::new(color, *shape);
|
||||
let bb = self.bitboard_for_piece(piece);
|
||||
if bb.has_piece_at(sq) {
|
||||
if bb.is_set(sq) {
|
||||
return Some(PlacedPiece::new(piece, sq));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue