1
0
Fork 0

make RawMove public

This commit is contained in:
Paul-Nicolas Madelaine 2025-12-01 23:39:31 +01:00
parent 6de44c64a7
commit 22098bbfff
3 changed files with 93 additions and 60 deletions

View file

@ -21,7 +21,7 @@ pub struct Move<'l> {
impl<'l> Move<'l> {
#[inline]
pub(crate) unsafe fn new_unchecked(position: &'l Position, raw: RawMove) -> Self {
pub(crate) unsafe fn new(position: &'l Position, raw: RawMove) -> Self {
Self { position, raw }
}
@ -83,10 +83,16 @@ impl<'l> Move<'l> {
}
}
/// Returns the raw data of the move.
#[inline]
pub fn raw(self) -> RawMove {
self.raw
}
/// Returns the UCI notation of the move.
#[inline]
pub fn to_uci(self) -> UciMove {
self.raw.uci()
self.raw.to_uci()
}
/// Returns the standard algebraic notation of the move.