update board representation
This commit is contained in:
parent
9a74ac0123
commit
85c7c8eb52
3 changed files with 184 additions and 147 deletions
|
|
@ -67,9 +67,9 @@ impl<'l> Move<'l> {
|
|||
/// Returns `true` if the move is a capture.
|
||||
#[inline]
|
||||
pub fn is_capture(self) -> bool {
|
||||
let setup = self.position.as_setup();
|
||||
let [p_b_q, n_b_k, r_q_k, _] = self.position.as_setup().bitboards;
|
||||
self.raw.kind == MoveType::EnPassant
|
||||
|| !((setup.p_b_q | setup.n_b_k | setup.r_q_k) & self.to().bitboard()).is_empty()
|
||||
|| !((p_b_q | n_b_k | r_q_k) & self.to().bitboard()).is_empty()
|
||||
}
|
||||
|
||||
/// Returns the type of piece that is captured, if the move is a capture.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue