implemented conversion method to_bitmovetype for enum MoveType

This commit is contained in:
Varga Dávid Lajos
2025-11-21 14:04:37 +01:00
parent f841fba080
commit e1d51fe291

View File

@@ -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
};
}
}