some minor refactoring

This commit is contained in:
rektdie committed 2025-03-10 08:22:51 +01:00
1 parent 869058ce77
commit 5e110019a3
2 files changed
+5 -9

No files matched your search

+5 -7
View File
@@ -94,9 +94,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta) {
}
}
int staticScore = Evaluate(board);
int bestScore = staticScore;
int bestScore = Evaluate(board);
if (bestScore>= beta) {
return bestScore;
@@ -188,11 +186,7 @@ SearchResults PVS(Board board, int depth, int alpha, int beta) {
}
}
int score = -inf;
int nodeType = AllNode;
GenerateMoves(board, board.sideToMove);
SortMoves(board);
if (board.currentMoveIndex == 0) {
if (board.InCheck(board.sideToMove)) { // checkmate
@@ -202,6 +196,10 @@ SearchResults PVS(Board board, int depth, int alpha, int beta) {
}
}
SortMoves(board);
int score = -inf;
int nodeType = AllNode;
SearchResults results(-inf);
// For all moves
-2
View File
@@ -180,8 +180,6 @@ void UCILoop(Board &board) {
// define user / GUI input buffer
std::string input = "";
PrintEngineInfo();
// main loop
while (true) {
// reset user / GUI input