diff options
Diffstat (limited to 'src/grossmeister')
-rw-r--r-- | src/grossmeister/move_selector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grossmeister/move_selector.rs b/src/grossmeister/move_selector.rs index 3ca2f1a..d26ffc0 100644 --- a/src/grossmeister/move_selector.rs +++ b/src/grossmeister/move_selector.rs @@ -74,7 +74,7 @@ impl MoveGenStage { pub struct MoveSelector { all_moves: ScoredMoveList, stage_moves: ScoredMoveIter, - pub killer_moves: MoveList, + pub killer_moves: SmallVec<[Move; 4]>, stage: MoveGenStage, } @@ -98,8 +98,8 @@ impl Grossmeister { let parent_killers = &mut self.move_selectors[(self.board.ply - 2) as usize].killer_moves; match parent_killers.iter().find(|m| **m == killer) { None => { - // println!("Registering killer {:?} for ply {}", killer, self.board.ply - 1); parent_killers.push(killer); + debug_assert!(!parent_killers.spilled(), "Killer move list should remain on the stack"); // We want to have max 3 killers, so if we exceed the limit remove the oldest killer if parent_killers.len() > 3 { parent_killers.remove(0); |