diff --git a/src/complexagent.rs b/src/complexagent.rs index 119fb0b..8d12813 100644 --- a/src/complexagent.rs +++ b/src/complexagent.rs @@ -115,8 +115,9 @@ impl FutureMoves { ) -> impl Iterator { let start_idx = self.arena.len(); self.arena.extend( - board - .possible_moves(color) + // use [`Board::all_positions`] here instead of [`Board::possible_moves`] + // because we use [`Board::what_if`] later and we want to reduce calls to [`Board::propegate_from_dry`] + Board::all_positions() .flat_map(|(i, j)| board.what_if(i, j, color).map(|x| (i, j, x))) .map(|(i, j, (new_board, captured))| Move { i,