[bitboard, board] Remove BitBoard::empty() and BitBoard::full()
These have been deprecated for a while. Clean up the remaining uses and remove the methods from BitBoard.
This commit is contained in:
parent
3a0541a2c3
commit
3d73760146
4 changed files with 24 additions and 34 deletions
|
@ -41,7 +41,7 @@ impl Movement for Piece {
|
|||
let parameters = Board::castling_parameters(Wing::KingSide, color);
|
||||
parameters.target.king.into()
|
||||
} else {
|
||||
BitBoard::empty()
|
||||
BitBoard::EMPTY
|
||||
};
|
||||
|
||||
let queenside_target_square = if board
|
||||
|
@ -51,7 +51,7 @@ impl Movement for Piece {
|
|||
let parameters = Board::castling_parameters(Wing::QueenSide, color);
|
||||
parameters.target.king.into()
|
||||
} else {
|
||||
BitBoard::empty()
|
||||
BitBoard::EMPTY
|
||||
};
|
||||
|
||||
self.sight(square, board) | kingside_target_square | queenside_target_square
|
||||
|
@ -99,11 +99,11 @@ mod tests {
|
|||
#[test]
|
||||
fn white_pushes_empty_board() {
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::E4.into(), Color::White, BitBoard::empty()),
|
||||
pawn_pushes(Square::E4.into(), Color::White, BitBoard::EMPTY),
|
||||
bitboard![E5]
|
||||
);
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::E2.into(), Color::White, BitBoard::empty()),
|
||||
pawn_pushes(Square::E2.into(), Color::White, BitBoard::EMPTY),
|
||||
bitboard![E3 E4]
|
||||
);
|
||||
}
|
||||
|
@ -111,11 +111,11 @@ mod tests {
|
|||
#[test]
|
||||
fn black_pawn_empty_board() {
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::A4.into(), Color::Black, BitBoard::empty()),
|
||||
pawn_pushes(Square::A4.into(), Color::Black, BitBoard::EMPTY),
|
||||
bitboard![A3]
|
||||
);
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::B7.into(), Color::Black, BitBoard::empty()),
|
||||
pawn_pushes(Square::B7.into(), Color::Black, BitBoard::EMPTY),
|
||||
bitboard![B6 B5]
|
||||
);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ mod tests {
|
|||
fn white_pushes_blocker() {
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::C5.into(), Color::White, bitboard![C6]),
|
||||
BitBoard::empty()
|
||||
BitBoard::EMPTY
|
||||
);
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::D2.into(), Color::White, bitboard![D4]),
|
||||
|
@ -132,7 +132,7 @@ mod tests {
|
|||
);
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::D2.into(), Color::White, bitboard![D3]),
|
||||
BitBoard::empty()
|
||||
BitBoard::EMPTY
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ mod tests {
|
|||
fn black_pushes_blocker() {
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::C5.into(), Color::Black, bitboard![C4]),
|
||||
BitBoard::empty()
|
||||
BitBoard::EMPTY
|
||||
);
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::D7.into(), Color::Black, bitboard![D5]),
|
||||
|
@ -148,7 +148,7 @@ mod tests {
|
|||
);
|
||||
assert_eq!(
|
||||
pawn_pushes(Square::D7.into(), Color::Black, bitboard![D6]),
|
||||
BitBoard::empty()
|
||||
BitBoard::EMPTY
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ mod tests {
|
|||
let piece = piece!(White Pawn);
|
||||
let sight = piece.sight(Square::E4, &pos);
|
||||
|
||||
assert_eq!(sight, BitBoard::empty());
|
||||
assert_eq!(sight, BitBoard::EMPTY);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue