From 567405454d29c1847655e63c21af61d046caa05f Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 29 Apr 2024 08:35:58 +0200 Subject: [PATCH] evaluation now returns score relative to side to move --- source/evaluate.cpp | 2 +- source/main.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/evaluate.cpp b/source/evaluate.cpp index 0433c61..a2f63e0 100644 --- a/source/evaluate.cpp +++ b/source/evaluate.cpp @@ -39,5 +39,5 @@ int Evaluate(Board &board) { } } - return score; + return board.sideToMove ? -score : score; } \ No newline at end of file diff --git a/source/main.cpp b/source/main.cpp index 0e775e8..609c828 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -10,8 +10,6 @@ int main() { initSliderAttacks(); Board board; - - std::cout << Evaluate(board) << '\n'; - + return 0; } \ No newline at end of file