diff options
Diffstat (limited to 'src/board/engine.rs')
-rw-r--r-- | src/board/engine.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs index 3caa18b..e951178 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -412,7 +412,11 @@ impl Board { let mut moves = self.generate_pseudolegal_moves(color); moves = self.order_moves(moves, Vec::new()); - let stand_pat = self.evaluate(Some(moves.len() as f32)); + let queen_squares = match color { + Color::White => self.pieces[PieceType::Queen as usize], + Color::Black => self.pieces[PieceType::QueenBlack as usize], + }; + let stand_pat = self.evaluate(Some(moves.iter().filter(|m| m.source.to_bitboard() & queen_squares == 0).count() as f32)); if stand_pat >= beta { return beta; |