This commit is contained in:
Simon Gardling 2025-03-06 15:41:20 -05:00
parent 0d837ca054
commit f6312a9fef
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -308,7 +308,7 @@ impl FutureMoves {
current = n.parent; current = n.parent;
} }
let mut board = self.arena[root].board.clone(); let mut board = self.arena[root].board;
for (m, c) in hist.into_iter().rev() { for (m, c) in hist.into_iter().rev() {
if let Some(m) = m { if let Some(m) = m {
let _ = board.place(m, c); let _ = board.place(m, c);
@ -837,8 +837,7 @@ mod tests {
assert!( assert!(
board board
.possible_moves(futm.agent_color) .possible_moves(futm.agent_color)
.find(|x| Some(x) == best_move.as_ref()) .any(|x| Some(&x) == best_move.as_ref()),
.is_some(),
"futm played an invalid move" "futm played an invalid move"
); );
} }