added constructor for capture moves in bitboard::bitmove.rs

This commit is contained in:
Varga Dávid Lajos
2025-11-18 17:23:07 +01:00
parent 05294a7736
commit 7b9c1edbab

View File

@@ -18,6 +18,15 @@ impl BitMove {
promotion_piece: promotion_piece
};
}
#[inline]
pub fn capture(from: u8, to: u8, promotion_piece: Option<u8>) -> Self {
return Self {
move_type: BitMoveType::Capture,
from_square: from,
to_square: to,
promotion_piece: promotion_piece
};
}
}
pub enum BitMoveType {