refactor: Rename nPepetition to repetition
This commit is contained in:
parent
e54ec69b1d
commit
1de3e85883
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ using namespace std;
|
|||
extern vector<string> setup_bench(Position *, istream &);
|
||||
|
||||
#ifdef THREEFOLD_REPETITION
|
||||
extern int nRepetition;
|
||||
extern int repetition;
|
||||
extern vector<Key> 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);
|
||||
|
|
Loading…
Reference in New Issue