Pseudo legal #28
@@ -138,6 +138,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
|
|||||||
|
|
||||||
for (int i = 0; i < board.currentMoveIndex; i++) {
|
for (int i = 0; i < board.currentMoveIndex; i++) {
|
||||||
if (!board.IsLegal(board.moveList[i])) continue;
|
if (!board.IsLegal(board.moveList[i])) continue;
|
||||||
|
if (board.moveList[i].IsCapture()) {
|
||||||
Board copy = board;
|
Board copy = board;
|
||||||
copy.MakeMove(board.moveList[i], false);
|
copy.MakeMove(board.moveList[i], false);
|
||||||
int score = -Quiescence(copy, -beta, -alpha, ply + 1).score;
|
int score = -Quiescence(copy, -beta, -alpha, ply + 1).score;
|
||||||
@@ -154,6 +155,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
|
|||||||
results.bestMove = board.moveList[i];
|
results.bestMove = board.moveList[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
results.score = bestScore;
|
results.score = bestScore;
|
||||||
if (searchStopped) return 0;
|
if (searchStopped) return 0;
|
||||||
|
|||||||
Reference in new issue
Block a user