diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-01-27 21:37:15 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-01-27 21:40:34 +0300 |
commit | 345781ddc28b3f5987beb5b21acda6e532e0a37a (patch) | |
tree | 13ce562697d5c4197a8f285c6e6345ca2c4e5120 /src/moves.rs | |
parent | a85b31683d782c2cbcfc97e06f1cfb53ac9aee0a (diff) | |
download | chessnost-345781ddc28b3f5987beb5b21acda6e532e0a37a.tar.gz |
feat: prioritize equal captures over non-captures
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, + } + } } |