mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-11 08:32:41 +01:00
CuckooChess: Fixed broken handling of UCI "searchmoves".
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
package chess;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author petero
|
||||
@@ -35,6 +37,13 @@ public final class MoveGen {
|
||||
m = new Move[MAX_MOVES];
|
||||
this.size = 0;
|
||||
}
|
||||
public final void filter(List<Move> searchMoves) {
|
||||
int used = 0;
|
||||
for (int i = 0; i < size; i++)
|
||||
if (searchMoves.contains(m[i]))
|
||||
m[used++] = m[i];
|
||||
size = used;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user