From 92c65f3c2d5967b3b83208d87f5864b0c12d04cf Mon Sep 17 00:00:00 2001 From: Calcitem Date: Wed, 13 May 2020 01:45:45 +0800 Subject: [PATCH] =?UTF-8?q?movegen:=20refactor:=20=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ai/movegen.cpp | 2 +- src/ai/movegen.h | 2 +- src/ai/search.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ai/movegen.cpp b/src/ai/movegen.cpp index 490d1108..99c15d0a 100644 --- a/src/ai/movegen.cpp +++ b/src/ai/movegen.cpp @@ -297,7 +297,7 @@ void MoveList::shuffle() /// generate generates all the legal moves in the given position //template<> -ExtMove *generate(/* TODO: const */ Position *position, ExtMove *moveList) +ExtMove *generateMoves(/* TODO: const */ Position *position, ExtMove *moveList) { square_t square; player_t opponent; diff --git a/src/ai/movegen.h b/src/ai/movegen.h index a44572c8..d31df11f 100644 --- a/src/ai/movegen.h +++ b/src/ai/movegen.h @@ -61,7 +61,7 @@ inline bool operator < (const ExtMove &first, const ExtMove &second) } //template -ExtMove *generate(Position *pos, ExtMove *moveList); +ExtMove *generateMoves(Position *pos, ExtMove *moveList); /// The MoveList struct is a simple wrapper around generate(). It sometimes comes /// in handy to use this class instead of the low level generate() function. diff --git a/src/ai/search.cpp b/src/ai/search.cpp index 095aff63..097a57a6 100644 --- a/src/ai/search.cpp +++ b/src/ai/search.cpp @@ -469,7 +469,7 @@ value_t AIAlgorithm::search(depth_t depth, value_t alpha, value_t beta) ExtMove extMoves[MAX_MOVES]; memset(extMoves, 0, sizeof(extMoves)); - ExtMove *end = generate(st->position, extMoves); + ExtMove *end = generateMoves(st->position, extMoves); MovePicker mp(st->position, extMoves); mp.score();