diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/board/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/board/mod.rs b/src/board/mod.rs index 2b186d4..6df55ab 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -33,7 +33,6 @@ pub struct Board { attacks: Attacks, } - #[derive(Debug, Clone, Copy, PartialEq, Eq, num_enum::FromPrimitive)] #[repr(usize)] pub enum PieceType { @@ -518,7 +517,10 @@ impl Board { } } PieceType::Queen => { - // We do not include queen moves in mobility! + for source in serialize_bitboard(*piece) { + // Scale down mobility because we don't want our queen to be rushing too much + mobility += pop_count(self.attacks.queen(self.occupancy, source) & (empty | opponent_occupancy)) as f32 / 3.0; + } } incorrect_type => panic!("Incorrect piece type: {:?}", incorrect_type), } |