docs
This commit is contained in:
parent
457e0c5aff
commit
882ffa9e8f
1 changed files with 4 additions and 5 deletions
|
|
@ -124,7 +124,7 @@ impl Position {
|
|||
moves.len
|
||||
}
|
||||
|
||||
/// Discards the optional en passant target square.
|
||||
/// Discards the en passant target square.
|
||||
///
|
||||
/// This function is useful to check for position equality, notably when implementing FIDE's
|
||||
/// draw by repetition rules. Note that this function will remove the en passant target square
|
||||
|
|
@ -153,10 +153,9 @@ impl Position {
|
|||
self.0
|
||||
}
|
||||
|
||||
/// Tries to pass the turn to the other color, failing if it would leave the king in check.
|
||||
///
|
||||
/// When possible, this inverts the color to play and removes the en passant square if it
|
||||
/// exists.
|
||||
/// Returns the position after after passing the turn to the other color,
|
||||
/// and `None` if the king in check. On success, this inverts the color to
|
||||
/// play and discards the en passant square.
|
||||
pub fn pass(&self) -> Option<Self> {
|
||||
let setup = &self.0;
|
||||
let blockers = setup.p_b_q | setup.n_b_k | setup.r_q_k;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue