From 345781ddc28b3f5987beb5b21acda6e532e0a37a Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 27 Jan 2023 21:37:15 +0300 Subject: feat: prioritize equal captures over non-captures --- src/moves.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/moves.rs') 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, + } + } } -- cgit v1.2.3