remove extra call to propegate_from_dry
This commit is contained in:
parent
01ae7be70d
commit
9a114e2cb9
@ -115,8 +115,9 @@ impl FutureMoves {
|
||||
) -> impl Iterator<Item = usize> {
|
||||
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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user