From 0638d8c89951a4825ae2f5bd61b1d7fa0d606d7b Mon Sep 17 00:00:00 2001 From: "rektdie@gmail.com" Date: Tue, 30 Apr 2024 00:22:32 +0200 Subject: [PATCH] bugfix: NegaMax function got the board as reference --- source/search.cpp | 2 +- source/search.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index 7240dda..96f6793 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -2,7 +2,7 @@ #include "movegen.h" #include "evaluate.h" -int NegaMax(Board &board, int depth) { +int NegaMax(Board board, int depth) { if (depth == 0) return Evaluate(board); GenerateMoves(board, board.sideToMove); diff --git a/source/search.h b/source/search.h index bd9cafe..173e477 100644 --- a/source/search.h +++ b/source/search.h @@ -1,6 +1,6 @@ #pragma once #include "board.h" -int NegaMax(Board &board, int depth); +int NegaMax(Board board, int depth); Move NegaMaxHandler(Board &board, int depth); void SearchPosition(Board &board, int depth); \ No newline at end of file