diff options
Diffstat (limited to 'src/moves.rs')
-rw-r--r-- | src/moves.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/moves.rs b/src/moves.rs index 87b7c4b..34f8370 100644 --- a/src/moves.rs +++ b/src/moves.rs @@ -22,6 +22,15 @@ impl Move { let bb = self.source.to_bitboard() | self.target.to_bitboard(); print(bb, format!("{:?}", self).as_str()); } + + /// Tactical move is a move that changes material score + pub fn is_tactical(&self) -> bool { + match self.kind { + MoveKind::Capture => true, + MoveKind::EnPassant => true, + _ => false, + } + } } |