Fix the pawn unit tests
This commit is contained in:
parent
63c03fb879
commit
2a6b098cb8
4 changed files with 112 additions and 45 deletions
|
@ -3,7 +3,7 @@
|
|||
use chessfriend_core::{Rank, Square};
|
||||
|
||||
/// En passant information.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct EnPassant {
|
||||
target: Square,
|
||||
capture: Square,
|
||||
|
@ -39,10 +39,12 @@ impl EnPassant {
|
|||
}
|
||||
}
|
||||
|
||||
/// The square the capturing piece will move to.
|
||||
pub fn target_square(&self) -> Square {
|
||||
self.target
|
||||
}
|
||||
|
||||
/// The square on which the captured pawn sits.
|
||||
pub fn capture_square(&self) -> Square {
|
||||
self.capture
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue