fix failing test
This commit is contained in:
@@ -255,6 +255,10 @@ impl FutureMoves {
|
||||
!self.agent_color,
|
||||
self.agent_color,
|
||||
));
|
||||
// because we have to regenerate root from a [`Board`]
|
||||
// we need to reset the current_depth (fixes `skip_move_recovery`)
|
||||
self.current_depth = 0;
|
||||
|
||||
self.set_root_idx_raw(0);
|
||||
}
|
||||
|
||||
@@ -557,7 +561,7 @@ mod tests {
|
||||
board: Board::new(),
|
||||
winner: Winner::None,
|
||||
parent: None,
|
||||
children: vec![1],
|
||||
children: vec![],
|
||||
value: None,
|
||||
self_value: 0,
|
||||
color: Piece::Black,
|
||||
@@ -638,8 +642,9 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
/// tests whether or not FutureMoves can recover from multiple skips and then manually regenerating the arena
|
||||
#[test]
|
||||
fn best_move_failure() {
|
||||
fn skip_move_recovery() {
|
||||
let mut futm = FutureMoves::new(Piece::Black, FUTURE_MOVES_CONFIG);
|
||||
let mut board = Board::new().starting_pos();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user