Skip to content

Commit f71a04e

Browse files
committed
get_potential_moves returns only threats when there are
1 parent d17b10f commit f71a04e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/algorithm/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ impl Algorithm {
283283
opponent_captures,
284284
&self.patterns
285285
);
286+
result &= legal_open_cells;
287+
if result.is_any() {
288+
return result;
289+
}
286290
let is_threatened = result.is_any();
287291

288292
// Get the moves that threat `opponent` because those are good move to play.

0 commit comments

Comments
 (0)