make RawMove public
This commit is contained in:
parent
6de44c64a7
commit
22098bbfff
3 changed files with 93 additions and 60 deletions
10
src/moves.rs
10
src/moves.rs
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue