From e1d51fe29128cfbe9b6943dc2c5c1d0e48543b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Varga=20D=C3=A1vid=20Lajos?= Date: Fri, 21 Nov 2025 14:04:37 +0100 Subject: [PATCH] implemented conversion method to_bitmovetype for enum MoveType --- engine/src/movetype.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/src/movetype.rs b/engine/src/movetype.rs index e9740ae..c7fa6d9 100644 --- a/engine/src/movetype.rs +++ b/engine/src/movetype.rs @@ -20,4 +20,12 @@ impl MoveType { _ => panic!("invalid move_type index! should NEVER appear") } } + pub(in super) fn to_bitmoveType(&self) -> BitMoveType { + return match self { + &MoveType::Quiet => BitMoveType::Quiet, + &MoveType::Capture => BitMoveType::Capture, + &MoveType::Castle => BitMoveType::Castle, + &MoveType::EnPassant => BitMoveType::EnPassant + }; + } } \ No newline at end of file