Make use of assignment operators for 'Bitboard'
This commit is contained in:
parent
a6e8ac06b6
commit
2e410ba104
|
@ -140,7 +140,7 @@ impl Direction {
|
|||
|
||||
while !board.is_empty() {
|
||||
board = self.move_board(board);
|
||||
res = res | board;
|
||||
res |= board;
|
||||
if !(board & blockers).is_empty() {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -18,16 +18,16 @@ pub fn generate_rook_mask(square: Square) -> Bitboard {
|
|||
let mask = {
|
||||
let mut mask = Bitboard::EMPTY;
|
||||
if square.file() != File::A {
|
||||
mask = mask | File::A.into_bitboard()
|
||||
mask |= File::A.into_bitboard()
|
||||
};
|
||||
if square.file() != File::H {
|
||||
mask = mask | File::H.into_bitboard()
|
||||
mask |= File::H.into_bitboard()
|
||||
};
|
||||
if square.rank() != Rank::First {
|
||||
mask = mask | Rank::First.into_bitboard()
|
||||
mask |= Rank::First.into_bitboard()
|
||||
};
|
||||
if square.rank() != Rank::Eighth {
|
||||
mask = mask | Rank::Eighth.into_bitboard()
|
||||
mask |= Rank::Eighth.into_bitboard()
|
||||
};
|
||||
mask
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue