use of common.datastore.blocks.ReadOnlyListPieces in project solution-finder by knewjade.
the class Task method call.
@Override
public List<Pair<List<Piece>, List<Result>>> call() throws Exception {
Checkmate<Action> checkmate = obj.checkmateThreadLocal.get();
Candidate<Action> candidate = obj.candidateThreadLocal.get();
// 探索
List<Pair<List<Piece>, List<Result>>> allResults = new ArrayList<>();
for (ReadOnlyListPieces piece : targets) {
List<Piece> pieces = piece.getPieces();
List<Result> results = checkmate.search(obj.field, pieces, candidate, obj.maxClearLine, obj.maxDepth);
allResults.add(new Pair<>(pieces, results));
}
return allResults;
}