DroidFish: Fixed broken handling of UCI "searchmoves" in the cuckoochess engine.

This commit is contained in:
Peter Osterlund
2012-01-17 23:35:51 +00:00
parent 7a762d1ff0
commit 600b306195

View File

@@ -126,8 +126,8 @@ public class DroidEngineControl {
computeTimeLimit(sPar);
ponder = false;
infinite = (maxTimeLimit < 0) && (maxDepth < 0) && (maxNodes < 0);
startThread(minTimeLimit, maxTimeLimit, maxDepth, maxNodes);
searchMoves = sPar.searchMoves;
startThread(minTimeLimit, maxTimeLimit, maxDepth, maxNodes);
}
final public void startPonder(Position pos, List<Move> moves, SearchParams sPar) {
@@ -227,9 +227,8 @@ public class DroidEngineControl {
sc.nodesBetweenTimeCheck = 500;
MoveGen.MoveList moves = moveGen.pseudoLegalMoves(pos);
MoveGen.removeIllegal(pos, moves);
if ((searchMoves != null) && (searchMoves.size() > 0)) {
Arrays.asList(moves.m).retainAll(searchMoves);
}
if ((searchMoves != null) && (searchMoves.size() > 0))
moves.filter(searchMoves);
final MoveGen.MoveList srchMoves = moves;
onePossibleMove = false;
if ((srchMoves.size < 2) && !infinite) {