added constructor for quiet moves in bitboard::bitmove.rs
This commit is contained in:
@@ -5,4 +5,17 @@ pub struct BitMove {
|
||||
pub from_square: u8,
|
||||
pub to_square: u8,
|
||||
pub promotion_piece: Option<u8>
|
||||
}
|
||||
|
||||
impl BitMove {
|
||||
|
||||
#[inline]
|
||||
pub fn quiet(from: u8, to: u8, promotion_piece: Option<u8>) -> Self {
|
||||
return Self {
|
||||
move_type: 0,
|
||||
from_square: from,
|
||||
to_square: to,
|
||||
promotion_piece: promotion_piece
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user