From 1de3e85883aead1c3e5a33e2a477cc83ed3e8d29 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Thu, 31 Dec 2020 22:00:32 +0800 Subject: [PATCH] refactor: Rename nPepetition to repetition --- src/position.cpp | 4 ++-- src/search.cpp | 8 ++++---- src/uci.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index 0128142c..a7fe8d13 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -547,13 +547,13 @@ int Position::piece_in_hand_count() } #ifdef THREEFOLD_REPETITION -extern int nRepetition; +extern int repetition; #endif // THREEFOLD_REPETITION bool Position::reset() { #ifdef THREEFOLD_REPETITION - nRepetition = 0; + repetition = 0; #endif // THREEFOLD_REPETITION gamePly = 0; diff --git a/src/search.cpp b/src/search.cpp index edeea585..b0a7d4fe 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -78,7 +78,7 @@ void Search::clear() } #ifdef THREEFOLD_REPETITION -int nRepetition; +int repetition; #endif // THREEFOLD_REPETITION /// Thread::search() is the main iterative deepening loop. It calls search() @@ -113,9 +113,9 @@ int Thread::search() for (auto i : moveHistory) { if (key == i) { - nRepetition++; - if (nRepetition == 3) { - nRepetition = 0; + repetition++; + if (repetition == 3) { + repetition = 0; return 3; } } diff --git a/src/uci.cpp b/src/uci.cpp index 8b0daedb..256d22c3 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -39,7 +39,7 @@ using namespace std; extern vector setup_bench(Position *, istream &); #ifdef THREEFOLD_REPETITION -extern int nRepetition; +extern int repetition; extern vector moveHistory; #endif // THREEFOLD_REPETITION @@ -72,7 +72,7 @@ void position(Position *pos, istringstream &is) return; #ifdef THREEFOLD_REPETITION - nRepetition = 0; + repetition = 0; moveHistory.clear(); #endif // THREEFOLD_REPETITION @@ -126,7 +126,7 @@ void go(Position *pos) #endif #ifdef THREEFOLD_REPETITION - nRepetition = 0; + repetition = 0; #endif // THREEFOLD_REPETITION Threads.start_thinking(pos);