Add move generation for castling

This commit is contained in:
2024-06-12 00:16:21 +03:00
parent 1f7cbbe577
commit a0959bf6b9
3 changed files with 165 additions and 6 deletions

View File

@@ -70,6 +70,10 @@ impl State {
pub const fn get_en_passant_target_square(&self) -> Option<u8> {
self.en_passant_target_square
}
pub const fn get_castling_ability(&self) -> u8 {
self.castling_ability
}
}
use std::fmt;
@@ -87,3 +91,10 @@ impl Default for State {
Self::new()
}
}
pub enum CastlingRights {
Short,
Long,
Both,
None,
}