inline
This commit is contained in:
parent
5d9ac032dd
commit
f97a594635
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ pub struct Move<'l> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'l> Move<'l> {
|
impl<'l> Move<'l> {
|
||||||
|
#[inline]
|
||||||
pub(crate) unsafe fn new_unchecked(position: &'l Position, raw: RawMove) -> Self {
|
pub(crate) unsafe fn new_unchecked(position: &'l Position, raw: RawMove) -> Self {
|
||||||
Self { position, raw }
|
Self { position, raw }
|
||||||
}
|
}
|
||||||
|
|
@ -28,6 +29,7 @@ impl<'l> Move<'l> {
|
||||||
///
|
///
|
||||||
/// This sets the en passant square after a double pawn advance, even when there is no pawn to
|
/// This sets the en passant square after a double pawn advance, even when there is no pawn to
|
||||||
/// capture or when capturing is not legal.
|
/// capture or when capturing is not legal.
|
||||||
|
#[inline]
|
||||||
pub fn make(self) -> Position {
|
pub fn make(self) -> Position {
|
||||||
let mut position = self.position.clone();
|
let mut position = self.position.clone();
|
||||||
unsafe { position.play_unchecked(self.raw) };
|
unsafe { position.play_unchecked(self.raw) };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue